Files
nuclei-templates/file/python/python-scanner.yaml

56 lines
1.4 KiB
YAML
Raw Normal View History

2021-10-24 16:48:44 +03:30
id: python-scanner
info:
name: Python Scanner
author: majidmc2
severity: info
2023-08-11 10:25:18 +05:30
description: Indicators for dangerous Python functions
2021-10-25 14:35:29 +05:30
reference:
- https://www.kevinlondon.com/2015/07/26/dangerous-python-functions.html
- https://www.kevinlondon.com/2015/08/15/dangerous-python-functions-pt2.html
2021-10-25 14:35:43 +05:30
tags: python,file,sast
2021-10-24 16:48:44 +03:30
file:
- extensions:
- py
extractors:
- type: regex
2021-10-25 16:03:46 +05:30
name: code-injection
2021-10-24 16:48:44 +03:30
regex:
- 'exec'
- 'eval'
- '__import__'
- 'execfile'
2023-08-04 16:50:30 +05:30
2021-10-24 16:48:44 +03:30
- type: regex
2021-10-25 16:03:46 +05:30
name: command-injection
2021-10-24 16:48:44 +03:30
regex:
- 'subprocess.call\(.*shell=True.*\)'
- 'os.system'
- 'os.popen\d?'
- 'subprocess.run'
- 'commands.getoutput'
2021-10-24 16:48:44 +03:30
- type: regex
2021-10-25 16:03:46 +05:30
name: untrusted-source
2021-10-24 16:48:44 +03:30
regex:
- 'pickle\.loads'
- 'c?Pickle\.loads?'
- 'marshal\.loads'
- 'pickle\.Unpickler'
2021-10-24 16:48:44 +03:30
- type: regex
2021-10-25 16:03:46 +05:30
name: dangerous-yaml
2021-10-24 16:48:44 +03:30
regex:
- 'yaml\.load'
- 'yaml\.safe_load'
2021-10-24 16:48:44 +03:30
- type: regex
2021-10-25 16:03:46 +05:30
name: sqli
2021-10-24 16:48:44 +03:30
regex:
- 'cursor\.execute'
- 'sqlite3\.execute'
- 'MySQLdb\.execute'
- 'psycopg2\.execute'
- 'cx_Oracle\.execute'
2024-12-01 13:57:55 +00:00
# digest: 490a004630440220593fa88162bfb1a804486e725699a36f268819acb41cee9ca56cf921c27c9c400220245ed9c81efd9eccdd9afd2229c342e0714570125a8528ae371b86e5757df33f:922c64590222798bb761d5b6d8e72950