mirror of
https://github.com/lunchcat/sif.git
synced 2026-07-28 14:37:01 -07:00
* feat(modules): add tfvars, ansible-vault and ci config exposure * chore(modules): trim redundant module header comments drop the top-line comments on the new iac config exposure modules that just restated the id/name fields already in the info block
48 lines
1.0 KiB
YAML
48 lines
1.0 KiB
YAML
id: ansible-vault-exposure
|
|
info:
|
|
name: Ansible Vault Exposure
|
|
author: sif
|
|
severity: medium
|
|
description: Detects an exposed ansible-vault encrypted file, confirming ansible-managed infrastructure and giving an attacker ciphertext to brute force offline
|
|
tags: [ansible, vault, iac, secrets, exposure, recon]
|
|
|
|
type: http
|
|
|
|
http:
|
|
method: GET
|
|
paths:
|
|
- "{{BaseURL}}/vault.yml"
|
|
- "{{BaseURL}}/secrets.yml"
|
|
- "{{BaseURL}}/group_vars/all/vault.yml"
|
|
- "{{BaseURL}}/group_vars/production/vault.yml"
|
|
|
|
matchers:
|
|
- type: status
|
|
status:
|
|
- 200
|
|
|
|
- type: regex
|
|
part: body
|
|
regex:
|
|
- '(?s)^\$ANSIBLE_VAULT;1\.[12];AES256\r?\n[0-9a-fA-F\s]+'
|
|
|
|
- type: word
|
|
part: body
|
|
negative: true
|
|
condition: or
|
|
words:
|
|
- "<!DOCTYPE"
|
|
- "<!doctype"
|
|
- "<html"
|
|
- "<HTML"
|
|
- "<head>"
|
|
- "<title>"
|
|
|
|
extractors:
|
|
- type: regex
|
|
name: vault_format_version
|
|
part: body
|
|
regex:
|
|
- '\$ANSIBLE_VAULT;1\.([12]);AES256'
|
|
group: 1
|