Beste Tweakers,
Update 8-4-2020
De Software Restriction Policy zoals hier beschreven werkt nog steeds naar behoren.
Als je gebruik maakt van FSlogix dan staat er verder in deze post de juiste paden.
Update 18-7-2019
De Software Restriction Policy zoals hier beschreven werkt nog steeds naar behoren.
Ik heb nu ook simpele GPO settings en tips toegevoegd (Onderaan deze post) die er voor zorgen dat kwaadwillende niet zomaar kunnen sniffen in je netwerk. ( Dit betekend natuurlijk niet dat je dan in eens security audit proof ben)
Update 30-6-2017
Onderstaande lijst van GPO locaties en file extensies zorgen er voor dat de WannaCry niet kan worden uitgevoerd(C:\Windows\mssecsvc.exe en dan dus niet gebruik kan maken van de SMBV1 leak) en de laatste Jaff ( .PDF die een .DOCM open en dan .exe download en uitvoert) die nu ook op duikt ook niet. Ik heb geen wijzigingen hoeven aan te brengen voor Petya aangezien deze ook gebruik maak van de EternalBlue Exploid.
Wikipedia: EternalBlue
Uitleg Petya
https://www.malwaretech.c...e-attack-whats-known.html
Ik wil mijn manier van Ransomware preventie met jullie delen omdat deze manier voor mij goed werkt.
Kleine achtergrond:
Ik ben een systeembeheerder die ook bij andere bedrijven over de vloer komt ( Consultant)
Kennis: Dit is bedoeld voor mede beheerders
Geschatte implementatie duur: 10 ~ 15 min (Alleen de GPO! De duur tot het bij de clients werkt kan wel langer zijn. of je moet gpupdate /force gebruiken)
Wat is mijn manier:
Ik werk graag met GPO en ik maak gebruik van een Software Restriction Policy ( in dit geval Computer Policy)
In de paden hier onder zal je een map zien : Content.Outlook Dit is een map die wordt gebruikt door Outlook om daar temp files neer te zetten(kleine uitleg: https://www.slipstick.com/outlook/securetemp-files-folder/). Dit gebeurt zodra je dubbel klik op een bijlage dit is een geheel random aangemaakte map vandaar de variable \*
Zodra er een .zip wordt geopend en je dubbel klik het bestand wat hier in zit dan komt dit in je "normale temp" te staan %temp% of terwijl: %USERPROFILE%\AppData\Local\Temp
Meestal bevat zo .zip een script extensie zoals .vbs dit script zal van alles gaan uitvoeren en waarschijnlijk downloaden van internet. mijn idee is dus om de scripting files te blocken! (Met succes)
De onderstaande paden zouden misschien aangepast moeten worden aan je eigen omgeving
Denk aan redirected folders ect ect maar over het algemeen ziet het er zo voor mij uit.
Dit is voor mij altijd een combi van Windows met Outlook
- Maak een nieuwe GPO en noem deze "Software Restriction Policy"
- Maak een nieuwe Restriction onder: -Computer Configuration - Windows Settings - Security Settings - Software Restriction Policy
-Ga naar Additional Rules en voeg de volgende paden + extensie toe:
User Temp:
%USERPROFILE%\AppData\Local\Temp\*\*.bat
%USERPROFILE%\AppData\Local\Temp\*\*.dll
%USERPROFILE%\AppData\Local\Temp\*\*.js
%USERPROFILE%\AppData\Local\Temp\*\*.lnk
%USERPROFILE%\AppData\Local\Temp\*\*.ps1
%USERPROFILE%\AppData\Local\Temp\*\*.scr
%USERPROFILE%\AppData\Local\Temp\*\*.svg
%USERPROFILE%\AppData\Local\Temp\*\*.vbs
%USERPROFILE%\AppData\Local\Temp\*\*.wsf
%USERPROFILE%\AppData\Local\Temp\*\*.html
%USERPROFILE%\AppData\Local\Temp\*\*.exe
%USERPROFILE%\AppData\Local\Temp\*\*.hta ( Voor Wannacry en Petya)
%USERPROFILE%\AppData\Local\Temp\*.exe (Voor Jaff)
C:\Windows\mssecsvc.exe ( Voor Wannacry en Petya)
C:\Windows\tasksche.exe ( Voor Wannacry en Petya)
C:\programdata\*\mssecsvc.exe ( Voor Wannacry en Petya)
C:\programdata\*\ tasksche.exe ( Voor Wannacry en Petya])
Windows XP /2003:
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.bat
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.dll
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.lnk
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.ps1
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.scr
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.svg
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.vbs
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.wsf
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.hta ( Voor Wannacry en Petya)
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*\*.js
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.js
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*.js
W8/W10/2012/2016:
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.bat
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.dll
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.exe
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.html
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.lnk
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.ps1
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.scr
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.svg
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.vbs
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.wsf
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.hta ( Voor Wannacry en Petya)
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*.js
W7/2008:
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.bat
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.dll
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.exe
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.html
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.lnk
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.ps1
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.scr
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.svg
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.vbs
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.wsf
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.hta ( Voor Wannacry en Petya)
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.js
FSlogix (getest met RDS 2016):
User Temp:
C:\Users\local_%username%\Temp\*\*.bat
C:\Users\local_%username%\Temp\*\*.dll
C:\Users\local_%username%\Temp\*\*.exe
C:\Users\local_%username%\Temp\*\*.hta
C:\Users\local_%username%\Temp\*\*.html
C:\Users\local_%username%\Temp\*\*.js
C:\Users\local_%username%\Temp\*\*.lnk
C:\Users\local_%username%\Temp\*\*.msi
C:\Users\local_%username%\Temp\*\*.ps1
C:\Users\local_%username%\Temp\*\*.scr
C:\Users\local_%username%\Temp\*\*.svg
C:\Users\local_%username%\Temp\*\*.vbs
C:\Users\local_%username%\Temp\*\*.wsf
C:\Users\local_%username%\Temp\*\*\*.bat
C:\Users\local_%username%\Temp\*\*\*.dll
C:\Users\local_%username%\Temp\*\*\*.exe
C:\Users\local_%username%\Temp\*\*\*.hta
C:\Users\local_%username%\Temp\*\*\*.html
C:\Users\local_%username%\Temp\*\*\*.js
C:\Users\local_%username%\Temp\*\*\*.lnk
C:\Users\local_%username%\Temp\*\*\*.msi
C:\Users\local_%username%\Temp\*\*\*.ps1
C:\Users\local_%username%\Temp\*\*\*.scr
C:\Users\local_%username%\Temp\*\*\*.svg
C:\Users\local_%username%\Temp\*\*\*.vbs
C:\Users\local_%username%\Temp\*\*\*.wsf
C:\Users\local_%username%\Temp\*\*\*\*.bat
C:\Users\local_%username%\Temp\*\*\*\*.dll
C:\Users\local_%username%\Temp\*\*\*\*.exe
C:\Users\local_%username%\Temp\*\*\*\*.hta
C:\Users\local_%username%\Temp\*\*\*\*.html
C:\Users\local_%username%\Temp\*\*\*\*.js
C:\Users\local_%username%\Temp\*\*\*\*.lnk
C:\Users\local_%username%\Temp\*\*\*\*.msi
C:\Users\local_%username%\Temp\*\*\*\*.ps1
C:\Users\local_%username%\Temp\*\*\*\*.scr
C:\Users\local_%username%\Temp\*\*\*\*.svg
C:\Users\local_%username%\Temp\*\*\*\*.vbs
C:\Users\local_%username%\Temp\*\*\*\*.wsf
Outlook Temp:
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.bat
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.dll
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.exe
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.hta
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.html
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.js
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.lnk
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.msi
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.ps1
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.scr
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.svg
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.vbs
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.wsf
Je zult zien dat er minder snel wat gebeurt als er een Factuur.pdf.zip binnen komt
Als je dan een .vbs wil starten uit zo Factuur.pdf.zip krijg je het volgende te zien:
GPO Block:

Crypto die JS via HTML download:

Overzicht hoe deze GPO er uit ziet in een Combi Domein van OS:

Tevens een mooie blog van een van de andere tweakers die laat zien hoe een Document ( kwaadaardig) met een Macro werkt.
Title TK: A dissection of a malicious Excel macro: obfuscation FTW
Thanks YellowOnline
Update 18-7-2019
De volgende tips en settings bemoeilijken het sniffen in je netwerk
1. Disable LLMNR en Netbios
Netbios
In je DHCP scope is dit simpel te doen namelijk door het volgende:
Disable NetBIOS on the DHCP server
Click Start, point to Programs, point to Administrative Tools, and then click DHCP.
In the navigation pane, expand the server_name, expand Scope, right-click Scope Options, and then click Configure Options.
Note In this step, the server_name placeholder specifies the name of the DHCP server.
Click the Advanced tab, and then click Microsoft Windows 2000 Options in the Vendor class list.
Make sure that Default User Class is selected in the User class list.
Click to select the 001 Microsoft Disable Netbios Option check box, under the Available Options column.
In the Data entry area, type 0x2 in the Long box, and then click OK.

Voor static ip's kan je het ook scripten
# This script will take a list of systems
# and turn off Netbios from all the adapters
#
#
# The list #
$computers = Get-Content -Path C:\temp\servers.txt
#
#
#
# Changing the adapters setting #
$adapters=(gwmi win32_networkadapterconfiguration -cn $computers -EA Silently Continue)
Foreach ($adapter in $adapters){
Write-Host $adapter
$adapter.settcpipnetbios(2)
}
servers.txt staan dan dus je servers in.
LLMNR
Is een GPO setting
Computer Configuration > Administrative Templates > Network > DNS Client & enable 'Turn Off Multicast Name Resolution' by changing its value to 'Enabled'.

Waarom?
Deze protocollen kunnen makkelijk worden gebruikt door kwaadwillende die in je netwerk willen komen en al zitten (WPAD attack)
Lees volgende blog dan wordt het duidelijker.
https://www.notsosecure.c...onder-a-pentesters-guide/
2. Disable SMB1
Let op dit kan impact hebben in je omgeving dus check eerst even of SMB1 nog gebruikt wordt met bijvoorbeeld NMAP
Command is: nmap -p139,445 --script smb-protocols *hier je subnet*
Disablen doe ik via reg keys en niet het verwijderen van Windows Features (Computer Policy)
Key 1
Action Create
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Value name SMB1
Value type REG_DWORD
Value data 0x0 (0)

Key 2
Action Update
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\services\mrxsmb10
Value name Start
Value type REG_DWORD
Value data 0x4 (4)

Key 3
Action Replace
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Services\LanmanWorkstation
Value name DependOnService
Value type REG_MULTI_SZ
LinesLine Value
1 Bowser
2 MRxSmb20
3 NSI

3. Prevent Mimikatz Attacks
Wat is Mimikatz?
https://www.csoonline.com...ssword-stealing-tool.html
Kort: haalt uit het geheugen van je clients wachtwoorden.
De volgende GPO settings zullen dit tegenhouden
Key
Action Create
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\Lsa
Value name RunAsPPL
Value type REG_DWORD
Value data 0x1 (1)
Disable debug
Group Policy Management Editor -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> Debug programs -> Define these policy settings:

Disable Credential Caching
Computer Configuration -> Windows Settings -> Local Policy -> Security Options -> Interactive Logon: Number of previous logons to cache -> 0

Door bovenstaande settings is/wordt je domain een stuk veiliger.
Groetjes,
Ben
Update 8-4-2020
De Software Restriction Policy zoals hier beschreven werkt nog steeds naar behoren.
Als je gebruik maakt van FSlogix dan staat er verder in deze post de juiste paden.
Update 18-7-2019
De Software Restriction Policy zoals hier beschreven werkt nog steeds naar behoren.
Ik heb nu ook simpele GPO settings en tips toegevoegd (Onderaan deze post) die er voor zorgen dat kwaadwillende niet zomaar kunnen sniffen in je netwerk. ( Dit betekend natuurlijk niet dat je dan in eens security audit proof ben)
Update 30-6-2017
Onderstaande lijst van GPO locaties en file extensies zorgen er voor dat de WannaCry niet kan worden uitgevoerd(C:\Windows\mssecsvc.exe en dan dus niet gebruik kan maken van de SMBV1 leak) en de laatste Jaff ( .PDF die een .DOCM open en dan .exe download en uitvoert) die nu ook op duikt ook niet. Ik heb geen wijzigingen hoeven aan te brengen voor Petya aangezien deze ook gebruik maak van de EternalBlue Exploid.
Wikipedia: EternalBlue
Uitleg Petya
https://www.malwaretech.c...e-attack-whats-known.html
Ik wil mijn manier van Ransomware preventie met jullie delen omdat deze manier voor mij goed werkt.
Kleine achtergrond:
Ik ben een systeembeheerder die ook bij andere bedrijven over de vloer komt ( Consultant)
Kennis: Dit is bedoeld voor mede beheerders
Geschatte implementatie duur: 10 ~ 15 min (Alleen de GPO! De duur tot het bij de clients werkt kan wel langer zijn. of je moet gpupdate /force gebruiken)
Wat is mijn manier:
Ik werk graag met GPO en ik maak gebruik van een Software Restriction Policy ( in dit geval Computer Policy)
In de paden hier onder zal je een map zien : Content.Outlook Dit is een map die wordt gebruikt door Outlook om daar temp files neer te zetten(kleine uitleg: https://www.slipstick.com/outlook/securetemp-files-folder/). Dit gebeurt zodra je dubbel klik op een bijlage dit is een geheel random aangemaakte map vandaar de variable \*
Zodra er een .zip wordt geopend en je dubbel klik het bestand wat hier in zit dan komt dit in je "normale temp" te staan %temp% of terwijl: %USERPROFILE%\AppData\Local\Temp
Meestal bevat zo .zip een script extensie zoals .vbs dit script zal van alles gaan uitvoeren en waarschijnlijk downloaden van internet. mijn idee is dus om de scripting files te blocken! (Met succes)
De onderstaande paden zouden misschien aangepast moeten worden aan je eigen omgeving
Denk aan redirected folders ect ect maar over het algemeen ziet het er zo voor mij uit.
Dit is voor mij altijd een combi van Windows met Outlook
- Maak een nieuwe GPO en noem deze "Software Restriction Policy"
- Maak een nieuwe Restriction onder: -Computer Configuration - Windows Settings - Security Settings - Software Restriction Policy
-Ga naar Additional Rules en voeg de volgende paden + extensie toe:
User Temp:
%USERPROFILE%\AppData\Local\Temp\*\*.bat
%USERPROFILE%\AppData\Local\Temp\*\*.dll
%USERPROFILE%\AppData\Local\Temp\*\*.js
%USERPROFILE%\AppData\Local\Temp\*\*.lnk
%USERPROFILE%\AppData\Local\Temp\*\*.ps1
%USERPROFILE%\AppData\Local\Temp\*\*.scr
%USERPROFILE%\AppData\Local\Temp\*\*.svg
%USERPROFILE%\AppData\Local\Temp\*\*.vbs
%USERPROFILE%\AppData\Local\Temp\*\*.wsf
%USERPROFILE%\AppData\Local\Temp\*\*.html
%USERPROFILE%\AppData\Local\Temp\*\*.exe
%USERPROFILE%\AppData\Local\Temp\*\*.hta ( Voor Wannacry en Petya)
%USERPROFILE%\AppData\Local\Temp\*.exe (Voor Jaff)
C:\Windows\mssecsvc.exe ( Voor Wannacry en Petya)
C:\Windows\tasksche.exe ( Voor Wannacry en Petya)
C:\programdata\*\mssecsvc.exe ( Voor Wannacry en Petya)
C:\programdata\*\ tasksche.exe ( Voor Wannacry en Petya])
Windows XP /2003:
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.bat
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.dll
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.lnk
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.ps1
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.scr
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.svg
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.vbs
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.wsf
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.hta ( Voor Wannacry en Petya)
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*\*.js
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*\*.js
C:\Documents and Settings\%username%\Local Settings\Temporary Internet Files\*.js
W8/W10/2012/2016:
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.bat
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.dll
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.exe
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.html
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.lnk
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.ps1
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.scr
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.svg
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.vbs
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.wsf
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\Content.Outlook\*\*.hta ( Voor Wannacry en Petya)
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*\*.js
C:\users\%username%\Appdata\Local\Microsoft\Windows\INetCache\*.js
W7/2008:
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.bat
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.dll
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.exe
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.html
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.lnk
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.ps1
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.scr
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.svg
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.vbs
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.wsf
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.Outlook\*\*.hta ( Voor Wannacry en Petya)
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*\*.js
C:\Users\%username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.js
FSlogix (getest met RDS 2016):
User Temp:
C:\Users\local_%username%\Temp\*\*.bat
C:\Users\local_%username%\Temp\*\*.dll
C:\Users\local_%username%\Temp\*\*.exe
C:\Users\local_%username%\Temp\*\*.hta
C:\Users\local_%username%\Temp\*\*.html
C:\Users\local_%username%\Temp\*\*.js
C:\Users\local_%username%\Temp\*\*.lnk
C:\Users\local_%username%\Temp\*\*.msi
C:\Users\local_%username%\Temp\*\*.ps1
C:\Users\local_%username%\Temp\*\*.scr
C:\Users\local_%username%\Temp\*\*.svg
C:\Users\local_%username%\Temp\*\*.vbs
C:\Users\local_%username%\Temp\*\*.wsf
C:\Users\local_%username%\Temp\*\*\*.bat
C:\Users\local_%username%\Temp\*\*\*.dll
C:\Users\local_%username%\Temp\*\*\*.exe
C:\Users\local_%username%\Temp\*\*\*.hta
C:\Users\local_%username%\Temp\*\*\*.html
C:\Users\local_%username%\Temp\*\*\*.js
C:\Users\local_%username%\Temp\*\*\*.lnk
C:\Users\local_%username%\Temp\*\*\*.msi
C:\Users\local_%username%\Temp\*\*\*.ps1
C:\Users\local_%username%\Temp\*\*\*.scr
C:\Users\local_%username%\Temp\*\*\*.svg
C:\Users\local_%username%\Temp\*\*\*.vbs
C:\Users\local_%username%\Temp\*\*\*.wsf
C:\Users\local_%username%\Temp\*\*\*\*.bat
C:\Users\local_%username%\Temp\*\*\*\*.dll
C:\Users\local_%username%\Temp\*\*\*\*.exe
C:\Users\local_%username%\Temp\*\*\*\*.hta
C:\Users\local_%username%\Temp\*\*\*\*.html
C:\Users\local_%username%\Temp\*\*\*\*.js
C:\Users\local_%username%\Temp\*\*\*\*.lnk
C:\Users\local_%username%\Temp\*\*\*\*.msi
C:\Users\local_%username%\Temp\*\*\*\*.ps1
C:\Users\local_%username%\Temp\*\*\*\*.scr
C:\Users\local_%username%\Temp\*\*\*\*.svg
C:\Users\local_%username%\Temp\*\*\*\*.vbs
C:\Users\local_%username%\Temp\*\*\*\*.wsf
Outlook Temp:
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.bat
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.dll
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.exe
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.hta
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.html
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.js
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.lnk
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.msi
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.ps1
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.scr
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.svg
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.vbs
C:\Users\local_%username%\INetCache\Content.Outlook\*\*.wsf
Je zult zien dat er minder snel wat gebeurt als er een Factuur.pdf.zip binnen komt
Als je dan een .vbs wil starten uit zo Factuur.pdf.zip krijg je het volgende te zien:
GPO Block:

Crypto die JS via HTML download:

Overzicht hoe deze GPO er uit ziet in een Combi Domein van OS:

Tevens een mooie blog van een van de andere tweakers die laat zien hoe een Document ( kwaadaardig) met een Macro werkt.
Title TK: A dissection of a malicious Excel macro: obfuscation FTW
Thanks YellowOnline
Update 18-7-2019
De volgende tips en settings bemoeilijken het sniffen in je netwerk
1. Disable LLMNR en Netbios
Netbios
In je DHCP scope is dit simpel te doen namelijk door het volgende:
Disable NetBIOS on the DHCP server
Click Start, point to Programs, point to Administrative Tools, and then click DHCP.
In the navigation pane, expand the server_name, expand Scope, right-click Scope Options, and then click Configure Options.
Note In this step, the server_name placeholder specifies the name of the DHCP server.
Click the Advanced tab, and then click Microsoft Windows 2000 Options in the Vendor class list.
Make sure that Default User Class is selected in the User class list.
Click to select the 001 Microsoft Disable Netbios Option check box, under the Available Options column.
In the Data entry area, type 0x2 in the Long box, and then click OK.
Voor static ip's kan je het ook scripten
# This script will take a list of systems
# and turn off Netbios from all the adapters
#
#
# The list #
$computers = Get-Content -Path C:\temp\servers.txt
#
#
#
# Changing the adapters setting #
$adapters=(gwmi win32_networkadapterconfiguration -cn $computers -EA Silently Continue)
Foreach ($adapter in $adapters){
Write-Host $adapter
$adapter.settcpipnetbios(2)
}
servers.txt staan dan dus je servers in.
LLMNR
Is een GPO setting
Computer Configuration > Administrative Templates > Network > DNS Client & enable 'Turn Off Multicast Name Resolution' by changing its value to 'Enabled'.

Waarom?
Deze protocollen kunnen makkelijk worden gebruikt door kwaadwillende die in je netwerk willen komen en al zitten (WPAD attack)
Lees volgende blog dan wordt het duidelijker.
https://www.notsosecure.c...onder-a-pentesters-guide/
2. Disable SMB1
Let op dit kan impact hebben in je omgeving dus check eerst even of SMB1 nog gebruikt wordt met bijvoorbeeld NMAP
Command is: nmap -p139,445 --script smb-protocols *hier je subnet*
Disablen doe ik via reg keys en niet het verwijderen van Windows Features (Computer Policy)
Key 1
Action Create
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
Value name SMB1
Value type REG_DWORD
Value data 0x0 (0)
Key 2
Action Update
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\services\mrxsmb10
Value name Start
Value type REG_DWORD
Value data 0x4 (4)
Key 3
Action Replace
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Services\LanmanWorkstation
Value name DependOnService
Value type REG_MULTI_SZ
LinesLine Value
1 Bowser
2 MRxSmb20
3 NSI
3. Prevent Mimikatz Attacks
Wat is Mimikatz?
https://www.csoonline.com...ssword-stealing-tool.html
Kort: haalt uit het geheugen van je clients wachtwoorden.
De volgende GPO settings zullen dit tegenhouden
Key
Action Create
PropertiesHive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\Lsa
Value name RunAsPPL
Value type REG_DWORD
Value data 0x1 (1)
Disable debug
Group Policy Management Editor -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment -> Debug programs -> Define these policy settings:

Disable Credential Caching
Computer Configuration -> Windows Settings -> Local Policy -> Security Options -> Interactive Logon: Number of previous logons to cache -> 0

Door bovenstaande settings is/wordt je domain een stuk veiliger.
Groetjes,
Ben
[ Voor 78% gewijzigd door Ben1988 op 08-04-2020 15:55 ]