rubric/modules/infosecmodules/infosec_registry.go
2026-07-21 14:52:55 +03:00

117 lines
3.9 KiB
Go
Executable file
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package infosecmodules
import (
"fmt"
"rubric/utils"
"strings"
)
type Module struct {
Key string
Aliases []string
Title string
Description string
Run func()
}
var All = []Module{
BasicsModule,
CryptoModule,
PkiModule,
NetsecModule,
WebModule,
HardeningModule,
AuthnModule,
ToolsModule,
}
func Find(key string) (Module, bool) {
key = strings.ToLower(strings.TrimSpace(key))
for _, m := range All {
if m.Key == key {
return m, true
}
for _, a := range m.Aliases {
if a == key {
return m, true
}
}
}
return Module{}, false
}
func ListModules() {
fmt.Printf("\n%s%sРазделы справочника InfoSec:%s\n\n",
utils.ColorBold, utils.ColorCyan, utils.ColorReset)
for i, m := range All {
fmt.Printf(" %s%d.%s %-14s — %s\n",
utils.ColorDim, i+1, utils.ColorReset,
utils.ColorYellow+utils.ColorBold+m.Key+utils.ColorReset,
m.Title,
)
}
fmt.Println()
}
// Keywords возвращает ключевые слова для поиска по модулю
func Keywords(key string) []string {
kw := map[string][]string{
"basics": {
"CIA", "конфиденциальность", "целостность", "доступность",
"угрозы", "уязвимости", "риски", "STRIDE", "DREAD", "PASTA",
"NIST", "ISO 27001", "CIS", "OWASP", "CVSS", "модель угроз",
"threat modeling", "zero trust", "defence in depth",
},
"crypto": {
"криптография", "шифрование", "encryption", "AES", "RSA", "ECDSA",
"Ed25519", "SHA", "SHA-256", "хэш", "hash", "HMAC", "MAC",
"симметричная", "асимметричная", "GCM", "ChaCha20", "bcrypt",
"Argon2", "соль", "salt", "пароли", "passwords", "PFS",
"Perfect Forward Secrecy", "квантовая", "постквантовая",
},
"pki": {
"PKI", "сертификаты", "certificates", "CA", "TLS", "SSL", "HTTPS",
"X.509", "RSA", "Let's Encrypt", "certbot", "ACME", "OpenSSL",
"CSR", "цепочка доверия", "cipher suite", "handshake", "HSTS",
"SNI", "SAN", "wildcard", "отзыв", "CRL", "OCSP",
},
"netsec": {
"сетевая безопасность", "nmap", "сканирование", "scan", "tcpdump",
"Wireshark", "IDS", "IPS", "Snort", "Suricata", "firewall",
"iptables", "nftables", "VPN", "WireGuard", "OpenVPN", "IPsec",
"DDoS", "MITM", "ARP spoofing", "DNS spoofing", "сегментация",
"VLAN", "DMZ", "masscan", "Network Policy",
},
"web": {
"OWASP", "XSS", "SQL injection", "SQLi", "CSRF", "SSRF", "XXE",
"инъекции", "injection", "Path traversal", "IDOR", "broken access",
"CSP", "Content Security Policy", "WAF", "веб-уязвимости",
"burp suite", "sqlmap", "nikto", "gobuster", "ffuf",
},
"hardening": {
"hardening", "усиление", "SSH", "sshd_config", "auditd", "аудит",
"Lynis", "OpenSCAP", "CIS Benchmarks", "sysctl", "AIDE",
"целостность файлов", "unattended-upgrades", "fail2ban",
"минимальные привилегии", "least privilege",
},
"authn": {
"аутентификация", "авторизация", "MFA", "2FA", "TOTP", "FIDO2",
"WebAuthn", "passkeys", "JWT", "токены", "OAuth2", "OIDC",
"LDAP", "Active Directory", "Kerberos", "RBAC", "ABAC",
"Vault", "HashiCorp", "secrets", "секреты", "пароли",
"bcrypt", "SSO", "Single Sign-On",
},
"tools": {
"nmap", "Metasploit", "Burp Suite", "Wireshark", "Hashcat",
"John the Ripper", "sqlmap", "gobuster", "ffuf", "nikto",
"OSINT", "Shodan", "theHarvester", "subfinder", "amass",
"пентест", "pentest", "CTF", "форензика", "forensics",
"Ghidra", "IDA", "LinPEAS", "WinPEAS", "BloodHound",
"Mimikatz", "Cobalt Strike", "MITRE ATT&CK", "threat hunting",
},
}
if v, ok := kw[key]; ok {
return v
}
return []string{}
}