Browse Source

few more checklists

Marius Schwarz 5 years ago
parent
commit
41da16b2b2

+ 74 - 0
checklists/fatclient-audit.md

@@ -0,0 +1,74 @@
+---
+title: Fat-Client Audit Checklist
+categories: [checklists]
+tags: [fatclient, audit]
+---
+
+# Fat-Client Audit Checklist
+
+
+## Authentication & Encryption
+
+* [ ] Is the traffic encrypted?
+* [ ] Insecure Crypto Algorithms?
+* [ ] HTTPS: Certificate Pinning?
+* [ ] Message Authentication (HMAC?)
+* [ ] Authentication only on the client side?
+* [ ] Change privileges by impersonating a different user
+* [ ] Able to change the permissions client side?
+* [ ] MitM Application (Burp, CANAPE, ...)
+
+
+## Implementation
+
+* [ ] Language: C#, Java, C/C++?
+* [ ] Native Implementation: Memory Corruptions
+* [ ] Native Implementation: Unsafe functions (memcpy, strcpy)
+* [ ] DEP, ASLR enabled?
+* [ ] Hardcoded Credentials
+* [ ] Obfuscated code?
+* [ ] PDB Files with symbols?
+* [ ] Sensitive Information in the binary? (Developer Paths, ..)
+* [ ] Elevation of Privileges?
+* [ ] Authent. Logic on the client or server?
+* [ ] Debugging the application
+* [ ] Error Messages with too much information
+* [ ] Outdated libraries?
+* [ ] Deserialization Vulnerabilities
+
+
+## Business Logic
+
+* [ ] Proper separation of access rights
+* [ ] Bypass client-side validations
+
+
+## Configuration
+
+* [ ] Hardcoded Credentials
+* [ ] Encrypted Configuration Files?
+* [ ] Other sensitive Information?
+* [ ] Change application settings (E.g. Developer Mode)
+
+
+## Useful Tools
+
+* Dissassembler: IDA Pro, Cutter, Ghidra, dnSpy, ..
+* Debugger: r2, x64, ...
+* Proxy: Burp Suite, CANAPE
+* Sysinternals: Process Explorer, Process Monitor, strings, ..
+* API Monitor
+* Frida (+ Fermion GUI)
+
+
+## Further Tipps/Hints:
+
+* procmon for president:
+    * Check for network endpoints (disable DNS resolving)
+    * Check loaded configuration files
+    * Check if files are loaded from shares
+    * Check for missing DLLs for DLL Load Order Hijacking (if proc. is elvated)
+* Introspect socket content with API Monitor and backtrace syscalls to the original DLL/Executable
+* View all loaded DLLs with Process Explorer (Ctr+D)
+* If openSSL is used: hook the SSL_write and SSL_read functions to read the plaintext traffic.
+

+ 19 - 0
checklists/hardening/win10-AD-hardening.md

@@ -0,0 +1,19 @@
+---
+title: Windows Active Directory Hardening
+categories: [checklists]
+tags: [windows, hardening, AD]
+---
+
+# Windows Active Directory Hardening
+
+
+## NTLM Hardening
+
+* [ ] Enforce SMB Signing to prevents simple NTLM relaying attacks
+* [ ] Block NTLMv1 (can be set via GPO)
+* [ ] Enforce LDAP/S Signing to prevent NTLM relay in LDAP
+* [ ] Enforce EPA (to prevent NTLM relay on Web Servers)
+
+## Credential hardening
+
+* [ ] Disable LM hashes via GPO noLMHash

+ 120 - 0
checklists/hardening/win10-boot-hardening.md

@@ -0,0 +1,120 @@
+---
+title: Windows 10 Boot Hardening
+categories: [checklists]
+tags: [windows, hardening]
+---
+
+# Windows 10 Boot Hardening
+
+Weitere Infos unter: https://docs.microsoft.com/en-us/windows/security/information-protection/secure-the-windows-10-boot-process
+
+## Enable Secure Boot
+## Secure Boot aktivieren
+
+Secure Boot verhindert dass andere Betriebssysteme (außer Windows) gebootet werden können.
+Dadurch wird z.B. verhindert dass Malware/Rootkits den existierenden Windows Bootloader überschreiben und Schadcode ausführen.
+Dieses Feature sollte im BIOS unbedingt aktiviert werden.
+
+
+## Adjust Boot Order
+## Bootreihenfolge anpassen
+
+Die Boot Reihenfolge sollte dahingehend geändert werden dass zuerst von der Festplatte
+gebootet wird und nicht von einer CD/DVD.
+
+## BIOS Password
+
+Es sollte ein BIOS Passwort vergeben werden um sicherszustellen dass nicht von
+einem anderen Medium gebootet werden kann. Zusätzlich können andere Sicherheitsmaßnahmen wie
+SecureBoot von einem Angreifer dadurch nicht ausgeschaltet werden.
+
+
+## Disable Intel AMT / Change default Password
+## Intel AMT deaktivieren / Standard Password ändern
+
+Über das feature Intel AMT¹ (Intel Active Management Technology) können per remote Zugriff
+funktionen der Intel Management Engine (ME) genutzt werden.
+Darunter fallen features wie das umgehen des BIOS passwords.
+Das standard Passwort von Intel AMT muss geändert werden. Besser noch, sollte AMT komplett über MEBX² deaktiviert werden. Das deaktivieren von Intel AMT über das reguläre BIOS oder per Windows Gruppenrichtlinien ist __nicht__ ausreichend.
+
+
+¹ https://en.wikipedia.org/wiki/Intel_Active_Management_Technology
+² Intel Management Engine BIOS Extension
+
+
+## Windows Bitlocker
+
+Bitlocker ist ein Data-Protection Feature von Microsoft welches die Festplatte
+eines Computers verschlüsselt und somit unauthorisierten Zugriff auf die Daten verhindert.
+
+
+## Gefahren von Bitlocker Transparent Mode
+
+Wird Bitlocker im Transparent Mode genutzt, bedeutet das, dass der Benutzer keinen PIN/Password beim booten des Computers eingeben muss. Dabei wird der _encryption key_ im TPM (Trusted Platform Module) des Geräts gespeichert.
+Das bedeutet ein Angreiffer kann ein _ausgeschaltetes_ Gerät ohne weitere Informationen booten.
+Beim booten wird die Festplatte entschlüsselt, wofür der dafür genutzte Schlüssel im Arbeitsspeicher present sein muss.
+Dadurch können z.b. DMA Angriffe (Direct Memory Access) durchgeführt werden um an den Schlüssel zu kommen.
+
+Bei DMA Angriffe werden DMA-Schnitstellen wie Firewire oder Thunderbold genutzt um den Schlüssel zur Laufzeit aus dem Arbeitsspeicher auszulesen und damit die gesamte Festplatte zu entschlüsseln.
+Falls solche Schnittstellen nicht verfügbar sind, kann ein Angreifer auch das Gerät öffnen und auf interne DMA Schnittstellen wie PCI-Express zugreifen um den Angriff durchzuführen.
+
+## Alternativen
+
+Bitlocker bietet alternativen zum oben gennanten Transparent Mode, wobei folgede Möglichkeiten nativ von Bitlocker unterstüzt werden:
+
+* TPM only (Transparent Mode)
+* TPM with PIN: Dabei wird beim booten ein PIN vom Benutzer verlangt um das Gerät zu entspressen.
+* TPM with USB: Dabei wird ein Key auf einem USB Stick gespeichert der beim Booten in das Gerät gesteckt werden muss um den Benutzer zu authentifizieren.
+* TPM with USB + PIN: Zwei Faktor Authentifizierung mit PIN & USB Stick
+* Without TPM: Key wird lediglich auf einem USB Stick gespeichert, wird nicht empfohlen, da keine Preboot Protection garantiert werden kann!
+
+
+Es wird in diesem Fall "TPM with PIN" oder "TPM with USB & PIN" empfohlen, da bei diess Verfahren
+jeweils noch ein Zusätzlicher Faktor benötigt wird und die Gefahren wie sie beim Transparent Mode vorliegen ausschließen.
+Allerdings erfordert die Option mit PIN & USB einen Mehraufwand in Sachen Support (Benutzer verliert USB Stick, ...)
+
+
+
+
+# Admin Stuff
+
+
+## "Admin Approval Mode" Logging in Windows 10
+
+Mit Hilfe von "runAs" könnne Programme mit dem lokalen Adminsitrator Account installiert werden, auch im Kontext des aktuell angemeldeteten benutzers.
+Dafür bietet "runAs" den Kommandozeilen Parameter '/nouser' um nicht das Benutzerprofil des Administrators zu laden, sondern das aktuelle Profil zu benutzen.
+Zusätzlich können mit dem Paramete '/env' auch die jeweiligen Umgebungsvariablen des bereits angemeldeten Benutzers übernommen werden.
+
+Um solche UAC Prompts zu loggen, kann das sogenannte UAC Auditing aktiviert werden.
+Dafür aktiviert man in den Policies unter:
+
+\Security Settings\Local Policies\Audit Policy
+
+die folgenden Policies (Success Attempts):
+* Audit Privilege Use
+* Audit Process Tracking
+
+Beim auslösen eines UAC Prompts werden folgende Event IDS ausgelöst.
+
+### Audit Privilege Use
+
+* 4648: sobald ein UAC prompt gestartet wird und ein programm im Kontext eines anderen Benutzers ausgeführt wird. Monitored unter anderem UAC Prompts und programme die über "runas.exe" direkt gestartet wurden.
+* 4624: monitored "successfull login of an account"
+
+
+
+### Audit Process Tracking
+
+* 4688: Damit kann man feststellen wenn der "AdminApprovalMode" genutzt wurde um programme mit erhöhten rechten auszuführen.
+
+Das Event sieht wie folgt aus:
+
+<screen>
+
+
+## Weitere Lösung
+
+Um sichere lokale Administrator Accounts zu garantieren, empfihelt es sich die LAPS Lösung von Microsoft genauer anzuschauen.
+Dabei werden lokale Administrator Accounts im AD angelegt, für jedes Gerät in der Domäne getrennt, wobei Passwörter automatisch regelmäßig geändert werden. Dies schützt z.B. vor Pass-the-Hash angriffen.
+Weitere Informationen finden Sie unter: <LAPS LINK>
+

+ 59 - 0
checklists/web/web-application-audit.md

@@ -0,0 +1,59 @@
+---
+title: Web Application Audit
+categories: [checklists]
+tags: [web, audit]
+---
+
+# Web Application Audit
+
+## Injection
+
+* [ ] SQLi
+* [ ] Local/Remote File Inclusion
+
+## Broken Auth
+
+* [ ] User Enumeration (Error messages/Response size/Timing)
+* [ ] No Brute-force Protections
+* [ ] Bad Password Policy
+* [ ] Bad Session Implementation
+
+## Sensitive Data
+
+* [ ] Non-existant/Insufficient Crypto
+* [ ] SSL Scan for Bad Crypto
+* [ ] Bad Storage of Sensitive Data
+* [ ] Directory/File Discovery/Fuzzing
+
+## XXE
+
+* [ ] XXE
+
+## Broken Access Control
+
+* [ ] Access Unintended Data
+* [ ] Direct/Hidden Links/Requests
+
+## Bad Config
+
+* [ ] Headers
+* [ ] Cookies
+* [ ] Error Messages/Stack Traces
+* [ ] Directory Traversal
+* [ ] Directory/File Discovery/Fuzzing
+* [ ] Malicious File Upload
+
+## XSS
+
+* [ ] Persistent XSS
+* [ ] DOM XSS
+* [ ] Reflected XSS
+
+## Insecure Deserialisation
+
+* [ ] Insecure Deserialisation
+
+## Vulnerable Components
+
+* [ ] Outdated/Vulnerable Software
+

+ 62 - 0
checklists/windows/win10-client-audit.md

@@ -0,0 +1,62 @@
+---
+title: Windows 10 Client Audit
+categories: [checklists]
+tags: [ windows, hardening]
+---
+
+# Checkliste Windows 10 Client Audit
+
+## Windows 10 Boot
+
+* [ ] BIOS Password
+* [ ] Secure Boot
+* [ ] Boot Order
+* [ ] Intel AMT Default Password
+
+
+## Windows GPOS best Practices
+
+* [ ] TBD
+
+
+## Windows Privilege Escalation
+
+* [ ] %WINDIR%\Panther\Unattended.xml
+* [ ] Unquoted Service Paths
+* [ ] Wrong service permissions
+* [ ] Wrong service executable permissions
+* [ ] Group Policy Preferences
+* [ ] AlwaysIntallElevated
+* [ ] AutoLogon Password in registry
+* [ ] DLL Load Order Highjacking
+* [ ] Missing Hotfixes
+* [ ] Hardcoded Credentials in config files/Scripts.
+* [ ] Sticky Keys
+
+
+## Third Part Tools
+
+* [ ] Old Versions/Vulnerable Versions
+* [ ] Hardcoded Credentials in config files/Scripts.
+* [ ] Reversing the Software
+
+
+## Windows 0day hunting
+
+* [ ] Advanced LPC Calls
+* [ ] scheduled tasks 0day
+
+
+## Common Tools
+
+* Powersploit
+* Empire
+* IDA
+* MeshCommander (Intel AMT)
+* PowerUp.ps1
+* Mimikatz
+* Sysinternsl
+    * accesschk.exe
+    * procmon.exe
+    * taskmon.exe
+    * ...