Posted on 5 Comments

How to hide an exe file in a Jpeg

I have been searching for a way to send an executable file to someone and make him to execute it. Sending the exe directly is not feasible. So let’s see how to hide an exe file in a jpeg and test its feasibility. First of all, create a new directory named test and download some images and name them similarly. I downloaded images of a popular Tollywood actress. The plan is to lure the victim into falling in the trap. I did this on a Windows 7 machine.

Go to Folder Options”, go to View tab”deselect ‘ Hide extensions for known file types‘ and select option Show hidden files, folders and drives. This will allow us to see the extensions of the files we are working with.

Open Notepad, type the following text and save it with the extension .bat”. What the following code does is it creates a new user named “hacker” with password “abc123″ in the Windows machine this code gets executed.

Download BAT to EXE converter and convert the batch file we just created to an exe.

Rename the file “samy.exe” to  “samy_3.jpg”. Windows will prompt a warning. Ignore it.

Right click on the file “samy_3.jpg”, drag it a little and leave. Select ‘Create Shortcuts here’. We are creating a shortcut for the file samy_3.jpg.

Rename the shortcut to “samy_0.jpg”. Whatever the name you give make sure that the shortcut is clicked first and not the exe file.

Right click on “samy_0.jpg” and select Properties. In the “Start in” column delete the entire text. In the “Target:” column type “C:Windowssystem32cmd.exec samy_3.jpg.” This will run the file samy_3.jpg when clicked on the samy_0.jpg.

Click on “Change Icon” tab. Replace the text inside with “%SystemRoot%system32SHELL32.dll” and click on “OK”.

Compress all files into zip archive with the name “samy”. Remember that name should be attractive enough to lure the victim into clicking the images.

OK, package is ready. Now the bigger challenge is to send the package to the victim’s computer. I tried to mail the package to the victim but it didn’t work out.

 So I suggest you to find your own way of sending it to the victim. To test if the package will work on the victim’s system or not open “CMD” and type the command “net user” before executing the image. It will show us all the users on the system.

Then click on the image samy_0.jpg. Open “CMD” and type the “net user” command again.

A new user named hacker has been created. So the trick worked.

Posted on 4 Comments

Setup a virtual pen testing lab : Step by Step guide

Virtual penetration testing lab is a lab created on a single system using any virtualization software. It can be very helpful for people practicing for CEH or similar certification. Any penetration testing lab has two machines, attacker and victim. In this lab we will set up Kali Linux as the attacker and Windows XP( most favorite victim machine ) as the victim. I am going to set up this lab in Vmware Workstation 9. Hope this will be helpful.

First of all install Kali Linux and Windows XP in Vmware Workstation.

Shut them down. In the Vmware Workstation menu, Select Edit” and click on Virtual Network editor.

The window below will open showing the virtual network adapters. Click on “Add network”.

Vmware provides nine virtual networks from 0 to 9. Vmnet0, Vmnet1 and Vmnet8 are automatically assigned for  bridged, Host-only and NAT types of network respectively. Select the network “Vmnet3″.

We can see that our network is added as Host-Type with a automatically assigned subnet IP.

Click on our network. We can see its settings below.

Deselect the option ‘Connect a host virtual adapter to the network’. This’. This‘.This will make our network a custom type. Change the subnet IP to choice is yours).  Select the ‘Use local DHCP service to distribute IP address to VMs‘ option. This will automatically assign IP addresses to our machines. Click on ‘DHCP settings‘.

You will see the below window. Make changes if you like. I am going to leave it default. Click OK twice to exit.

We have successfully created our custom network. Now let’s add our machines to the network. Open the tab of Kali Linux and click on ‘network adapter‘ setting.

In the settings, select the ‘custom radio button and select the network Vmnet3 from the dropdown menu. Click on OK.

Do the same for Windows XP. Then let’s boot up our victim machine and check it’s IP address by typing ‘ipconfig‘ in the command line. The DHCP server has automatically assigned it the IP address

Boot the attacker machine and check it’s IP address by typing ‘ifconfig’ in the terminal. It has been assigned the address

Ping the victim IP machine ( to see whether the two machines can communicate.

We have successfully created a virtual penetration testing lab. Happy testing.

Posted on Leave a comment

Server GUI to Minimal Server interface in Windows 2012

Windows Server 2012 introduced a new configuration option called Minimal Server Interface. Minimal Server Interface is in simple words compromise between Server GUI Full Installation and Server Core installation. Minimal Server Interface installation reduces footprint of the server to some extent thus decreasing security hazards. In the same time it increases deployment scenarios. Let’s see how to convert Server GUI to Minimal Server Interface in Windows server 2012. If you want to convert Server GUI full  installation to Server Core installation, read here.

Following tools are installed in Minimal Server Interface.

  • Server Manager
  • MMC
  • Some Control Panel Applets

The items which are not installed during Minimal Server Interface are

  • Start Screen
  • Desktop
  • Windows Explorer
  • Internet Explorer

Login as Administrator. Open  “Powershell”. Type the command

“Uninstall-WindowsFeature Server-Gui-Shell -remove” and Press “Enter”.

After collecting some data, the system will start removing the Server-Gui-Shell.

After the removal of Server-gui-shell is finished, the system will ask us to restart the system.

Restart the system by typing “shutdown -r -t 0″. The system will reboot to Minimal server Interface which will look like below.

Posted on 3 Comments

How to install GNS3 in windows : Step By Step guide

One day, I was intently searching for a method to emulate a router or switch in Oracle VirtualBox  After a long search, I didn’t find a method but I found  another virtualizing software called GNS3.  GNS3 is a network emulation software which can be really helpful to someone preparing for CCNA,CCNP,CCIE,JNCIA,JNCIS and JNCIE. It can emulate  Cisco IOS’s, Junos routers and also  complex networks functioning as close as possible to the real networks without needing the network hardware like routers and switches. The best part of it is that it is open source. However we will have to download Cisco IOS and Junos separately.

GNS3 is available for Windows, Linux and MacOS X. In this article, I am going to show you how to install GNS3 in Windows step by step.

Download the software suitable for your Windows from here. The all-in-one download is recommended.

Click on the executable file downloaded. The welcome message pops up. Click on “Next”.

Then the License Agreement is displayed. Click on “I Agree”.

Then you are asked to choose the start menu folder in which your  program’s shortcuts will be stored. If you choose the default folder, click “Next”. You can also create a new folder if you want.

Then you can choose which components you want to install from the components shown. I suggest you to choose all the options. Click on “Next”.

Then you are asked to choose where you want to install your program. you can choose a different folder if you want but the default folder should be OK. Click on “Install”.

Then the WinPcap installation wizard starts. WinPcap is an opensource library for packet capture and network analysis for Win32 platforms. Click on “Next”.

Click on “Next”.

On the WinPcap License Agreement, click on “I Agree”.

On the review WinPcap installation options, Click on “Install”.

The installation starts.

After the installation is finished, Click on “Finish”.

Then the  Wireshark installation wizard” opens (only if you selected the component for installation above). Wireshark is a network sniffer. Click on “Next”.

You are shown the License Agreement of Wireshark. Click on “I Agree”.

Then you are prompted to select the components of Wireshark you want to install. Choose all and Click on “Next”.

Then you are prompted to select which shortcuts you want to create. The choice is yours. Click on “Next”.

Then choose the directory in which you want to install Wireshark and click on “Next”.

Then Wireshark starts installing.

After the installation is completed, Click on “Next”.

Then Completion of Wireshark installation Wizard appears. You are prompted to choose if you want to run Wireshark. Don’t make any selection. Click on “Finish”.

Then the installation of GNS3 starts.

After the installation is completed, click on “Next”.

Completion of GNS3 wizard appears. Click on “Finish”.

Start GNS3. The following window appears when we start GNS3 for the first time. Click on 1(the space enclosed in a red box).

This is to check whether path to Dynamips and the path to its working directory are valid or not. Dynamips is the core program that allows IOS simulation. Click “OK”.

Let’s go to Step 2. Here we configure path to our IOS image directory. We have to store all our images in this directory. Make changes to the path if you want otherwise click on “OK”.

Step 3: In this step, we will add one or more uncompressed IOS images of a router or switch. As already said, IOS images should be downloaded separately due to license agreements.

Browse to the folder where your IOS image is. I am adding a CISCO c3700 router for example. Click on Save and your window should like this.

Click on “Close” and your GNS3  windows appears.

In the Node Types section, click on C700 (the type we just added)  and drag it to the right to see if our router has been added or not. If it is like below, then your installation is success. Happy practicing.

Posted on Leave a comment

Installing a domain controller in Windows Server 2012

Hi Friends, Today we will see how to install and promote a domain controller in Windows server 2012. It has seen a change while installing a domain controller. The “dcpromo.exe” present in previous versions has been deprecated. We need to install domain controller from Server Manager only. Before we start installing the domain controller let’s change our server’s name to ‘Server‘ and IP address to “″.

Now let’s go to Server Manager and start adding Active Directory Domain Services” role from Add Roles and Features. Click on “Add Roles and Features”.

Before we begin, we are presented with basic information on IP addresses, Windows updates and configuring strong passwords. Click “Next”.

Then we are prompted for the type of installation. Select Role Based or Feature based installation” and click Next”.

Then we are prompted to select the destination server. Select the server we just named and click “Next”.

Then we are asked to select the roles we want to install. Select Active Directory Domain Services and click “Next”.

Then we get a pop-up to add features that are required for Active Directory domain services. These features are automatically selected. Click on Add Features”.

We can see that Group Policy Management which is required for Active Directory Domain services has been automatically selected.

Then we are given a brief description about Active Directory domain services and some basic things to note. Click Next”.

Then we are shown the roles that will be installed on the server as a confirmation. Click on Install”.

Then the installation starts.

As the installation is finished, we get a message ‘Configuration required. Installation succeeded on server’. Click on Close”.

We have successfully installed Active Directory Domain Services on our server. Now we need to promote the domain controller. In the previous versions of Windows server, it is here we used dcpromo.exe. In our Server Manager, we have a notification flag with a yellow triangle with an exclamation mark inside it. Click on it.

Click on ‘Promote this server as domain controller’.

We are prompted to choose the configuration of our domain controller. Choose Add a new forest and specify the root domain name as Click on Next”.

We are asked to choose the domain controller options. Set the forest functional level and domain functional level as Windows Server 2012. Select DNS server. Since this is the root domain in the forest it is automatically Read only domain controller. Enter the DSRM password and click on Next”.

Then DNS options screen appears. Click on Next”.

Look at the NETBIOS name which is automatically assigned. It is shunya.

The location where the AD DS database, log files and SYSVOL are shown. We can specify different locations if we choose to be. Click on Next”.

Then we see a review of our selections. Click on Next”.

Then we see a Windows PowerShell script for AD DS deployment.

Then we get a prerequisites check window. Click on Install”.

After all the prerequisites are validated successfully, the server is successfully configured as a domain controller and the system is restarted.

After the system restarts, we are asked to login into the shunya domain.