Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Hunt for the red DA..
“Who am I?”
• Neil Lines - Pen Tester
• Involved in a range of security areas.
• Social Engineering (SE) is my favourite!
Part of
Team
Nettitude…
Quick Background..
The Media listed top nation-state
threats 2016!
Russia, China, Iran and North
Korea!
Source www.cbsnews.com
Cyber spying, or cyber espionage, is the act or
practice of obtaining secrets and information
without the permission and knowledge of the
holder of the information.
Source Wikipedia
Michael Daniel - Former US Special Assistant to the President and
Cybersecurity Coordinator.
“Your never be able to prevent all of them,
everything is penetrable eventually…”
What are the targets ?
• Transport
• Manufacturing / Retail
• Energy companies
• FINANCIAL companies
• Medical companies
Forget 0 days
Think
day zero!
After the power went it all
changed…
Last Sunday
02/04/2017
Hunt for the red DA
We are at war…
But To date No single act
of cybercrime has been
regarded as an act of
war?
Think Nation-State
Cyber threats
What do you think?
• Very costly;
• Massive global attacks;
• Highly sophisticated;
• The Pro’s…
An example…
Hunt for the red DA
Hunt for the red DA
What was taken…
• Personal information about Sony
Pictures employees.
• E-mails between employees.
• Salary information.
• Unreleased Sony films?
What did the #GOP do?
• Remote access to internal network.
• Exploited internal misconfigurations.
• Hunted out users of interest.
• Exploited to Domain Admin (DA).
• Stole data.
Hunt for the red DA
What's the
difference
between what
they did and
what a good
Pentester
does
?
we don’t Steal data…
What a good pentester does
• Gets Remote access to internal network.
• Exploits internal misconfigurations.
• Hunt’s out users of interest.
• Exploits to Domain Admin (DA).
So if pentestrs are doing this
How Highly sophisticated are the
spies?
Boiler plate stat time…
• Financial Firms take on average 98 days to
detect a breach.
• Retail take on average 197 days to detect a
breach.
• How long does it take to get access?
Source - Survey of 70 professional hackers at
DEFCON 2016.
• (88%) of hackers can break through
cybersecurity defences and into the systems
they target within 12 hours.
• Made me laugh - What are they sleeping??
“Got me thinking”
• Could a single person accomplished the
SONY hack;
• Was it sophisticated?
• And what would the cost be?
How much is a good
laptop these days?
The How to…
From the remote to internal..
Forget Zero day’s $$$
Macro, ole , HTA, or unc ??
Hunt for the red DA
UNC is amazing,
Another example…
Hunt for the red DA
Cred cracking!
“Rocktastic”
Lets not pretend we cant crack
hashes right?
But why not rules??
Rules do not
• add football teams.
• add towns or city names.
• add top 1000 male / female names.
• And are very slow…
“Slow Like I Care?”
Reality…
Final point before we go internal…
One word document can contain all of the
following not just one!
Macro,
OLE,
UNC..
Macro…
OLE…
UNC…
Hunt for the red DA
Hunt for the red DA
Rocking internals!
• Exploit internal
misconfigurations.
• Use credentials gained
from UNC.
Hunt for the red DA
How does this happen?
• Misconfigured services and shares on
local machines are common.
• PSExec is a light-weight telnet-replacement.
• lets you execute processes on other systems.
• The new MSF Psexec uses PS ;0)
• psexec > set rhost IP-Address
• psexec > set smbdomain Domain
• psexec > set smbuser Username
• psexec > set smbpass Password
• psexec > set share Writable-share
Hunt for the red DA
Run it twice.
Getsystem is not an exploit!
It attempts to impersonates a security context
with SYSTEM rights, if this works you get SYSTEM.
• meterpreter > getsystem
• [-] priv_elevate_getsystem: Opeation failed:
• [-] Named Pipe Impersonation
GETsystem fails, cry…
Hit up the exploits
MS16-032 - FuzzySecurity/PS
MSF ms14_058_track_popup_menu
MSF ms15_051_client_copy_image
don’t forget UAC Exploits HarmJ0y/PowerUp.
meterpreter > getsystem
meterpreter > hashdump
Administrator:500:aad3b435b51404eeaad3b435b5
1404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Update 101..
• Remote access to internal network;
• Exploit internal misconfigurations. Got
creds got hash!
Meanwhile
Time to Hunt out users of
interest (DA)…
So why da?
• The keys to the castle.
• Highest privileges on a single domain.
• Access all domain resources.
1. Logout of Nessus, if tempted to use
uninstall.
2. Start to listen to the traffic.
3. Know your tools.
The hunt begins!
Administrator:500:aad3b435b51404eeaad3b435b5
1404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
The clone (PTH)…
Microsoft do not salt local hashes.
• “It is difficult to alter the password processing algorithms
without impacting a lot of subsystems and potentially
breaking the backward compatibility, which is the driving
force of the Windows ecosystem.”
Hunt for the red DA
Hunt for the red DA
Criminals catching up - slowly
• 2016 reports of Ransomware starting to use
PTH.
• Pentest Used to discover more shares.
Hunt for the red DA
Hunt for the red DA
When should a DA
account be used?
So you found DA
how do you exploit?
Hunt for the red DA
Hunt for the red DA
Win 10 no fun!
MSF lockout_keylogger
Common password
choices for da?
Recap
• Got external access in
• Got user creds
• Enumerated misconfigurations
• Got DA
Now what?
Hunt for the red DA
Hunt for the red DA
Hunt for the red DA
Hunt for the red DA
On average during a test it
takes from 30 min’s – 4
hours…
(88%) of hackers can break through cybersecurity
defences and into the systems they target within
12 hours.
WHY I asked if they are sleeping!!
Quicker ways to pwn!
MS14-025: Vulnerability in Group Policy…
1. Any user has rights!
2. DNS Servers . . . : 10.1.20.220
3. 10.1.20.220sysvolNAMEPolicies
4. groups.xml, scheduledtasks.xml, & services.xml
services.xml
5. Microsoft published the AES encryption key on
MSDN
Hunt for the red DA
Hunt for the red DA
KB2962486 - prevents new credentials from
being placed in Group Policy Preferences…
It does not delete any previous added scripts!
Kerberoast…
Tim Medin revealed “Kerberoasting“
To the world.
1. Any user has rights!
2. Targets service accounts.
3. Used to be complex to exploit…
Kerberos provides secure user
authentication with an industry standard
that permits interoperability.
Kerberos Version 5 added to Win2k – Still
used today.
Hunt for the red DA
Invoke-Kerberoast -OutputFormat HashCat|Select-
Object -ExpandProperty hash
@benpturner and @davehardy20
Kerberoast - Using poshc2
1. Email a macro in;
2. Select your implant;
3. Run Invoke-Kerberoast;
4. Get hash;
5. Hashcat + Rocktastic;
6. DA…
• I took a look back over a few months tests.
• 14 internal infrastructure tests.
• 7 remote social engineering tests.
• I’m not lazy also did Web app and external inf
tests ;0)
• 17 out of 21 tests DA was gained.
• 81% of my tests resulted in DA?
• Why not 100%
• Hardening, not windows (PCI), Maybe offday?
remote SE failed, time to travel…
• Remote vs Internal SE?
• Why risk it when you can send an email?
• If time was no problem remote will always win.
• But if pressed for time maybe another way?
Before we go all internal!
Look at another route…
• Internals often include wireless testing.
• Segmentation the common concern.
• Corporate WIFI vs Guest WIFI.
• guest networks are common.
• Guest networks if secured often have Weak PSK
or PINS 4 digi (burp).
• If Segmented correctly where's the risk?
• Common to find corporate users on Guest WIFI.
• Microsoft does not forget.
• Reasons why they use Its quick and easy.
• We don’t broadcast wifi far ;0)
• Parbolic Grid 24 dBi Directional Antenna.
• From £37
• Plugs into an ALFA.
Apparently can work up to 8 miles?
• Yagi 14dBi Directional 2 miles.
• Plugs into an ALFA.
• More realistic, easier to hide.
• Corporate users on Guest WIFI.
• Responder, hashes, Rocktastic.
• Fierce DNS reconnaissance tool.
• SSL VPN, OWA or Office 365.
When it
just
doesn’t
work!
• Remote + wireless fails.
• Walk in off the street.
• Tailgating at 8:45am often works great.
• 12:00 – 2:00pm turnstiles “Sorry I nipped out
for lunch and forgot my pass”
So on site.
• Find a place to hide, fire up responder…
• mapped drives cause broadcasts!
Hunt for the red DA
• Responder is not receiving any hashes?
• I quite enjoy this it’s a challenge.
• Cold boot attacks.
• People encrypt laptops not PC’s.
• BIOS boot settings often standard.
• Why do people not stop you?
1. Boot Kali.
2. C:WindowsSystem32config
3. Copy SAM/SYSTEM
4. Pwdump
5. Hash
Bios protection
Easy to
bypass…
Grabbing SAM Bypass the following stages
• Responder.
• Domain user password cracking.
• Domain user share rights.
• Slight feels like cheating.
If all this fails then you can always fire up Nessus
lol…
Any questions?
@myexploit2600

More Related Content

Hunt for the red DA

Editor's Notes

  1. WAIT and ask
  2. On November 24, 2014, a hacker group which identified itself by the name "Guardians of Peace”
  3. Zero days brought by those that are low skilled but have money - Gov
  4. Office object linking and embedding (OLE) functionality to trick users into running a PS command that downloads malicious content.
  5. Macro
  6. OLE
  7. If shells are needed shelter or veil
  8. SMBEXEC
  9. Delegation of permissions!
  10. Delegation of permissions!
  11. Doesn't work on Wind 10, Server 2012 (needs reg tweak and reboot) – Does work on server 2008.
  12. Password1 year after Password2, POSH Cred-Popper
  13. Password1 year after Password2
  14. DC often the local computers DNS IP address
  15. Groups.xml Get creds, open share to sysvol, search groups.xml
  16. Get creds, open share to sysvol, search groups.xml
  17. On 2012 there is a patch to fix this but it just stops you from adding
  18. On 2012 there is a patch to fix this but it just stops you from adding
  19. Service accounts often DA, passwords set to not expire, and often weak password choices
  20. What is it?
  21. Feb 2016 hashcat added support for hashes collected via Kerberoast
  22. Get creds, open share to sysvol, search groups.xml
  23. Get creds, open share to sysvol, search groups.xml