Skip to content

Commit 750bc94

Browse files
committed
Merge pull request #41 from knownsec/dev
合并dev, 更新版本号
2 parents e65f9ff + 794d11d commit 750bc94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+196
-123
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| .-. | .-. | .--( .-'| || ,--'-. .-| .-. :
55
| '-' ' '-' \ `--.-' `' '' | | | | \ --.
66
| |-' `---' `---`----' `----'`--' `--' `----'
7-
`--' sebug.net
7+
`--' seebug.org
88
99
```
1010
Pocsuite 使用帮助文档
@@ -30,7 +30,7 @@ Pocsuite 是知道创宇安全研究团队打造的一款基于漏洞与 PoC 的
3030

3131
在获取到相关漏洞详情后,任何有一定 Python 开发基础的人都可以基于 Pocsuite 开发出对应漏洞的 PoC 或者 Exp ,轻而易举的就可以直接使用 Pocsuite 进行相关的验证和调用,而无需考虑底层代码架构等。
3232

33-
Sebug 重新改版上线之际,知道创宇安全研究团队正式对外开放 Pocsuite 框架,任何安全研究人员都可以基于 Pocsuite 进行 PoC 或者 Exp 的开发,同时也可以加入 Sebug 漏洞社区,为 Pocsuite 提供贡献或者贡献相关的 PoC。
33+
Seebug 重新改版上线之际,知道创宇安全研究团队正式对外开放 Pocsuite 框架,任何安全研究人员都可以基于 Pocsuite 进行 PoC 或者 Exp 的开发,同时也可以加入 Seebug 漏洞社区,为 Pocsuite 提供贡献或者贡献相关的 PoC。
3434

3535

3636
<h2 id="install">安装</h2>
@@ -260,5 +260,5 @@ PoC 支持 Python 和 JSON 两种格式,详情参见[PoC 编写规范](./docs/
260260

261261
<h2 id="links">相关链接</h2>
262262

263-
* Sebug [http://sebug.net](http://sebug.net)
264-
* 知道创宇 [http://www.knownsec.com](http://sebug.net)
263+
* Seebug [http://seebug.org](http://seebug.org)
264+
* 知道创宇 [http://www.knownsec.com](http://seebug.org)

docs/CHANGLOG.md

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
#####1. 修改入口函数 -\-headers 的 help 信息, 表述更清晰.
1+
##### 1. 修改入口函数 -\-headers 的 help 信息, 表述更清晰.
22

3-
#####2. 增加运行结束后的计数, 成功多少, 总共多少.
3+
##### 2. 增加运行结束后的计数, 成功多少, 总共多少.
44

5-
#####3. 入口函数增加 -\-retry, 超时重试次数, 重试途中有成功则不继续重试.
5+
##### 3. 入口函数增加 -\-retry, 超时重试次数, 重试途中有成功则不继续重试.
66

7-
#####4. 增加 IO 操作 api
7+
##### 4. 增加 IO 操作 api
88

9-
#####5. 增加自定义参数 extra_params 获取 api, 修复字符串转 python 内置类型时产生的错误.
9+
##### 5. 增加自定义参数 extra_params 获取 api, 修复字符串转 python 内置类型时产生的错误.
1010

11-
#####6. 增加每个现成两个请求直接的delay, 毫秒计.
11+
##### 6. 增加每个现成两个请求直接的delay, 毫秒计.
1212

13-
#####7. 完善入口参数 url 格式, 支持多个 url 用逗号分隔, 和 c 段的 /24 形式
13+
##### 7. 完善入口参数 url 格式, 支持多个 url 用逗号分隔, 和 c 段的 /24 形式
1414

15-
#####8. 增加从 urllib2 - opener 获取 headers 的 api
15+
##### 8. 增加从 urllib2 - opener 获取 headers 的 api
1616

17-
#####9. 增加 report 的显示条目, 对于 verify 也增加 report 的 detail 内容
17+
##### 9. 增加 report 的显示条目, 对于 verify 也增加 report 的 detail 内容
18+
19+
---
20+
21+
### 需要增加测试的位置:
22+
```
23+
1. /24 处, -u 提供的 /24, 和 -f 文件里的 /24
24+
2. load 文件夹处
25+
3. url 的逗号分隔处
26+
```

docs/COPYING

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
COPYING -- Describes the terms under which pocsuite is distributed. A copy
22
of the GNU General Public License (GPL) is appended to this file.
33

4-
pocsuite is (C) 2014-2015 pocsuite@sebug.net
4+
pocsuite is (C) 2014-2015 pocsuite@seebug.org
55

66
This program is free software; you may redistribute and/or modify it under
77
the terms of the GNU General Public License as published by the Free
88
Software Foundation; Version 2 (or later) with the clarifications and
99
exceptions described below. This guarantees your right to use, modify, and
1010
redistribute this software under certain conditions. If you wish to embed
1111
pocsuite technology into proprietary software, we sell alternative licenses
12-
(contact pocsuite@sebug.net).
12+
(contact pocsuite@seebug.org).
1313

1414

1515
****************************************************************************

docs/POCAPI.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| .-. | .-. | .--( .-'| || ,--'-. .-| .-. :
55
| '-' ' '-' \ `--.-' `' '' | | | | \ --.
66
| |-' `---' `---`----' `----'`--' `--' `----'
7-
`--' sebug.net
7+
`--' seebug.org
88
99
```
1010
PoC 编写说明文档
@@ -279,7 +279,7 @@ json 格式的 PoC 类似于完形填空,只需要填写相应的字段的值即
279279

280280
<h3 id="pyexample">PoC py代码示例</h3>
281281

282-
[Drupal 7.x /includes/database/database.inc SQL注入漏洞](http://www.sebug.net/vuldb/ssvid-88927) PoC:
282+
[Drupal 7.x /includes/database/database.inc SQL注入漏洞](http://www.seebug.org/vuldb/ssvid-88927) PoC:
283283
```
284284
#!/usr/bin/env python
285285
# coding: utf-8
@@ -373,9 +373,9 @@ register(TestPOC)
373373
```
374374

375375
<h3 id="jsonexample">PoC json代码示例</h3>
376-
[phpcms_2008_/ads/include/ads_place.class.php_sql注入漏洞](http://www.sebug.net/vuldb/ssvid-62274) PoC:
376+
[phpcms_2008_/ads/include/ads_place.class.php_sql注入漏洞](http://www.seebug.org/vuldb/ssvid-62274) PoC:
377377

378-
由于json不支持注释,所以具体字段意义请参考上文,涉及到的靶场请自行根据Sebug漏洞详情搭建
378+
由于json不支持注释,所以具体字段意义请参考上文,涉及到的靶场请自行根据Seebug漏洞详情搭建
379379

380380
```
381381
{
@@ -389,7 +389,7 @@ register(TestPOC)
389389
"protocol": "http",
390390
"vulType": "SQL Injection",
391391
"author": "Medici.Yan",
392-
"references": ["http://www.sebug.net/vuldb/ssvid-62274"],
392+
"references": ["http://www.seebug.org/vuldb/ssvid-62274"],
393393
"appName": "phpcms",
394394
"appVersion" : "2008",
395395
"appPowerLink":"http://www.phpcms.cn",
@@ -576,7 +576,7 @@ result:[
576576

577577
</table>
578578

579-
也可以参见[漏洞类型规范](http://sebug.net/category)
579+
也可以参见[漏洞类型规范](http://seebug.org/category)
580580

581581

582582
<h3 id="webshell">WebShell类</h3>

docs/THANKS.md

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ phithon <root(at)leavesongs.com>
1818

1919
GurdZain
2020
* for contributing a minor patch
21+
22+
1ookup < 377101099(at)qq.com>
23+
* for contributing a minor patch

pcs-attack.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88
import re

pcs-console.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88
import re

pcs-verify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88
import re

pocsuite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88
import re

pocsuite/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

99
__title__ = 'pocsuite'
10-
__version__ = '1.0.0dev16'
11-
__author__ = 'sebug.net'
10+
__version__ = '1.1.0'
11+
__author__ = 'seebug.org'
1212
__author_email__ = '[email protected]'
1313
__license__ = 'GPL 2.0'
1414
__copyright__ = 'Copyright 2015 Knownsec'
15-

pocsuite/api/missile.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,33 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

99
from pocsuite.lib.core.data import kb
1010
from pocsuite.pocsuite_cli import pcsInit
1111
from pocsuite.lib.core.common import banner
1212
from pocsuite.lib.core.settings import PCS_OPTIONS
13-
from pocsuite.lib.settings import HTTP_DEFAULT_HEADER
1413

1514

1615
class Missile():
16+
1717
def __init__(self, target, missile_info={}):
1818
if not missile_info["pocname"].endswith(".py"):
1919
missile_info["pocname"] += ".py"
20-
PCS_OPTIONS.update(missile_info)
20+
PCS_OPTIONS.update({
21+
"url": target,
22+
"host": "",
23+
"pocFile": missile_info["pocstring"],
24+
"isPocString": True,
25+
"pocname": missile_info["pocname"],
26+
"headers": "",
27+
"extra_params": "",
28+
"mode": missile_info["mode"],
29+
"retry": False,
30+
"delay": 0
31+
})
2132

2233
def run(self):
2334
pcsInit(PCS_OPTIONS)

pocsuite/api/poc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/api/request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/api/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/api/webshell.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/lib/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/lib/controller/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

pocsuite/lib/controller/check.py

+49-11
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,86 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

9+
import re
10+
from pocsuite.lib.core.data import kb
11+
from pocsuite.lib.core.data import conf
912
from pocsuite.lib.core.data import logger
1013
from pocsuite.lib.core.enums import CUSTOM_LOGGING
1114
from pocsuite.lib.core.settings import POC_ATTRS
15+
from pocsuite.lib.core.settings import POC_REQUIRES_REGEX
1216
from pocsuite.lib.core.settings import OLD_VERSION_CHARACTER
13-
from pocsuite.lib.core.data import kb
17+
18+
19+
def requiresCheck():
20+
if not conf.requires:
21+
return
22+
23+
requires_regex = re.compile(POC_REQUIRES_REGEX)
24+
install_requires = []
25+
for _, poc in kb.pocs.items():
26+
try:
27+
requires = requires_regex.search(poc).group(1)
28+
install_requires += [require[1:-1] for require in requires.split(",")]
29+
except Exception, ex:
30+
pass
31+
32+
infoMsg = "install_requires:\n" + "\n".join(install_requires)
33+
logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)
1434

1535

1636
def pocViolation():
1737
violation = False
18-
for pocname, pocInstance in kb.registeredPocs.items():
38+
if conf.requiresFreeze:
39+
install_requires = []
40+
for pocName, pocInstance in kb.registeredPocs.items():
41+
if isinstance(pocInstance, dict):
42+
continue
43+
requires = getRequires(pocName, pocInstance)
44+
if not requires:
45+
continue
46+
install_requires += list(requires)
47+
infoMsg = "install_requires:\n" + "\n".join(install_requires)
48+
logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)
49+
return
50+
51+
for pocName, pocInstance in kb.registeredPocs.items():
1952
if isinstance(pocInstance, dict):
20-
violation = checkJsonInfo(pocname, pocInstance)
53+
violation = checkJsonInfo(pocName, pocInstance)
2154
else:
22-
violation = checkPocInfo(pocname, pocInstance)
55+
violation = checkPocInfo(pocName, pocInstance)
2356
return violation
2457

2558

26-
def checkJsonInfo(pocname, pocInstance):
59+
def checkJsonInfo(pocName, pocInstance):
2760
infos = []
28-
infoMsg = "checking %s" % pocname
61+
infoMsg = "checking %s" % pocName
2962
logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)
3063
if 'pocInfo' in pocInstance:
3164
for attr in POC_ATTRS:
3265
if attr in pocInstance['pocInfo'] and pocInstance['pocInfo'].get(attr):
3366
continue
3467
infos.append(attr)
3568
if infos:
36-
warnMsg = "missing %s in %s" % (infos, pocname)
69+
warnMsg = "missing %s in %s" % (infos, pocName)
3770
logger.log(CUSTOM_LOGGING.WARNING, warnMsg)
3871
return False
3972
return True
4073

4174

42-
def checkPocInfo(pocname, pocInstance):
75+
def checkPocInfo(pocName, pocInstance):
4376
infos = []
44-
infoMsg = "checking %s" % pocname
77+
infoMsg = "checking %s" % pocName
4578
logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)
4679
for attr in POC_ATTRS:
4780
if hasattr(pocInstance, attr) and getattr(pocInstance, attr):
4881
continue
4982
infos.append(attr)
5083
if infos:
51-
warnMsg = "missing %s in %s" % (infos, pocname)
84+
warnMsg = "missing %s in %s" % (infos, pocName)
5285
logger.log(CUSTOM_LOGGING.WARNING, warnMsg)
5386
return False
5487
return True
@@ -59,3 +92,8 @@ def isOldVersionPoc(poc):
5992
if _ not in poc:
6093
return False
6194
return True
95+
96+
97+
def getRequires(pocName, pocInstance):
98+
if hasattr(pocInstance, "install_requires"):
99+
return getattr(pocInstance, "install_requires")

pocsuite/lib/controller/controller.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -*- coding: utf-8 -*-
33

44
"""
5-
Copyright (c) 2014-2015 pocsuite developers (http://sebug.net)
5+
Copyright (c) 2014-2015 pocsuite developers (http://seebug.org)
66
See the file 'docs/COPYING' for copying permission
77
"""
88

0 commit comments

Comments
 (0)