honeynet / riotpot

the IoT and OT (Operational Technology) Honeypot
MIT License
19 stars 4 forks source link

High-level ssh service #32

Closed eltsai closed 1 year ago

eltsai commented 1 year ago

Added real-world simulation of a ssh server - installing openssh in a ubuntu image.

For password-based authentication, we set RUN echo 'root:password' | chpasswd and below is the testing:

ssh root@localhost -p 2222
root@localhost's password: 
Permission denied, please try again.
root@localhost's password: 
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-78-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@9ad2e536996c:~# 

For key-based authentication, I added a README on how to generate the keys. Below is the test:

$ ssh -i riotpot_ed25519 root@localhost -p 2222
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-78-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@200449a06c7f:~#