Skip to content

Commit c189624

Browse files
wh0am1irungobier
authored andcommitted
feat: add Apache Struts2 dockerfile in pocs, add wait container start check.
1 parent 7693dac commit c189624

File tree

27 files changed

+43
-0
lines changed

27 files changed

+43
-0
lines changed

pocsuite3/lib/controller/controller.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import copy
22
import time
3+
4+
import requests
35
from prettytable import PrettyTable
46
from pocsuite3.lib.core.common import data_to_stdout, mosaic
57
from pocsuite3.lib.core.data import conf, cmd_line_options
@@ -88,12 +90,27 @@ def show_task_result():
8890
data_to_stdout("\nsuccess : {} / {}\n".format(success_num, total_num))
8991

9092

93+
def check_docker_status(target):
94+
if conf.docker_start:
95+
info_msg = "wait for docker..."
96+
logger.info(info_msg)
97+
while True:
98+
try:
99+
resp = requests.get(target)
100+
if resp.status_code:
101+
break
102+
except Exception:
103+
pass
104+
105+
91106
def task_run():
92107
while not kb.task_queue.empty() and kb.thread_continue:
93108
target, poc_module = kb.task_queue.get()
94109
if not conf.console_mode:
95110
poc_module = copy.deepcopy(kb.registered_pocs[poc_module])
96111
poc_name = poc_module.name
112+
# check container status
113+
check_docker_status(target)
97114

98115
if conf.pcap:
99116
# start capture flow

pocsuite3/pocs/Apache_Struts2/20090323_WEB_Apache_Struts2_001_RCE.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class DemoPOC(POCBase):
2424
desc = '''S2-001:影响版本Struts 2.0.0-2.0.8'''
2525
samples = []
2626
category = POC_CATEGORY.EXPLOITS.WEBAPP
27+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2728

2829
def _options(self):
2930
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20090323_WEB_Apache_Struts2_003_RCE_CVE-2008-6504.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class DemoPOC(POCBase):
2222
desc = '''Struts 2.0.0 - Struts 2.1.8.1'''
2323
samples = []
2424
category = POC_CATEGORY.EXPLOITS.WEBAPP
25+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2526

2627
def _options(self):
2728
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20100510_WEB_Apache_Struts2_005_RCE_CVE-2010-1870.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''Struts 2.0.0 - Struts 2.1.8.1'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20111001_WEB_Apache_Struts2_009_RCE_CVE-2011-3923.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''S2-009:影响版本Struts 2.0.0-2.3.1.1'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20120108_WEB_Apache_Struts2_007_RCE.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''S2-007:影响版本Struts 2.0.0 - Struts 2.2.3'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20120108_WEB_Apache_Struts2_008_RCE_CVE-2012-0394.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''[+] S2-008:影响版本Struts 2.1.0-2.3.1; GET请求发送数据; 支持任意命令执行和反弹shell'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20130219_WEB_Apache_Struts2_012_RCE_CVE-2013-1965.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''S2-012:影响版本Struts Showcase App 2.0.0 - Struts Showcase App 2.3.14.2'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20130219_WEB_Apache_Struts2_013_RCE_CVE-2013-1966.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''S2-013/S2-014:影响版本Struts 2.0.0-2.3.14.1'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

pocsuite3/pocs/Apache_Struts2/20130219_WEB_Apache_Struts2_015_RCE_CVE-2013-2134.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class DemoPOC(POCBase):
2323
desc = '''S2-015:影响版本Struts 2.0.0-2.3.14.2;'''
2424
samples = []
2525
category = POC_CATEGORY.EXPLOITS.WEBAPP
26+
dockerfile = '''FROM isxiangyang/struts2-all-vul-pocsuite:latest'''
2627

2728
def _options(self):
2829
o = OrderedDict()

0 commit comments

Comments
 (0)