1
Certified Ethical Hacker Module 5 - System Hacking Motivation and Study Techniques to help you learn, remember, and pass your technical exams! Cisco CISSP CEH More coming soon... Visit us www.mindcert.com Subscribe via RSS Remote Password Guessing Assuming TCP Port 139 is open NetBIOS Port Most eective method o breaking into Windows is Password guessing Connect to an enumerated share IPC$ Default Admin shares C$ Admin$ Administrator Password The default admin account is administrator same as root under UNIX Sometimes has a blank password Automated password guessing Can use a simple DOS Shell script Create or use a username/password file Build a script using the FOR command FOR /F "token=1, 2*" %1 in (credentials.txt) do net use \\target\IPC$ %i /u: %j Tools Legion Windows application Automates password guessing for NetBIOS sessions Scans multiple Class C addresses Manual dictionary attack tool NTInfoscan (now CIS) Windows tool Now Cerberus Internet Scanner Vulnerability Scanner designed for NT4 Will check NetBIOS shares Countermeasures Block access to TCP and UDP Ports 135 to 139 Disable WINS client on all adapters Use strong passwords Or two factor authentication Log failed logon attempts Security Log Event 529 or 539 Look at a logging application VisualLast From Foundstone Visual Log manager Eavesdropping Eavesdropping is sning the passwords from the network segment Subtopic To eavesdrop you have to be able to sniall VLAN trac Switch ports by default only see your trac and broadcasts Have to use a tool to get around this Hubs forward all frames out of all ports Some passwords are unencrypted Telnet POP3 etc.. Some passwords are encrypted Collect these passwords and hashes and then run attacks against them oine Tools LOphtcrack Windows Application Password auditing and recovery tool SMB Packet capture listens to the local network segment Captures individual login sessions Attacks the 24 byte hashed password Uses either Dictionary Or Brute Force attacks KerbCrack Windows command line application Conists of two programs kerbsniListens on the network and captures 2000/XP kerberos logins kerbcrack Uses dictionary or brute force to crack the password Denial of Service Tools nbname Sending a NetBIOS name release to the NetBIOS name service (UDP 137) places the name in conflict No longer able to use it Blocks the client from participating in the NetBIOS network Carries out a NetBIOS DoS attack SMBDie Crashes computers running Windows 2000/XP/NT Sends a specially crafted SMB request Privilege Escalation Once hacker has access to a system It is important to gain root or administrative level access May have gained access with a non admin account Tools GetAdmin Small .exe that adds a user to the local admin group Need to logon to the server console Run from the command line Only works on NT4.0 SP3 hk.exe Exposes a LPC Flaw in NT Escalates a non admin user to an admin user Keystroke Loggers Log all keyboard activity Types Hardware Physical devices that are connected to the keyboard port Software Applications that have to be installed on a users machine Tools Keyghost Hardware Keystroke logger USB or PS2 IKS Software Keylogger Windows software Invisible to the user Buer of 100 keystrokes Then dumps this to a configurable text file on the machine Password Cracking Algorithms Manual Password Cracking Find a valid user Create a list of possible passwords Ken in each password If the system allows you in Success Else Try again Automatic Password Cracking Find a valid user Find encryption algorithms used Obtain encrypted passwords Create list of possible passwords Encrypt each word See if it works Success Else Try again Password Types Only letters Easiest to crack Only numbers Only special characters Letters and numbers Harder to crack Letters and special characters Numbers and special characters Letters, numbers, and special characters Most secure passwords Password Attacks Dictionary attack Using a dictionary of words Or a wordlist Brute force attack Going through all possible combinations Will always work Eventually Hybrid attack A mixture of dictionary and brute force attacks Social engineering Ask the user for there password Shoulder surfing Look over there shoulder Dumpster diving Try to find password evidence in trash Lan Manager Hashes Windows clients by default send LM and NTLM password hashes NT/2000/XP Win9x Clients only send LM hashes Example Your password is 123andrew First converted to Uppercase 123ANDREW Password is padded with null characters to make it a 14 character length 123ANDREW_____ The 14 character string is split in two halves 123ANDR EW_____ Each string is encrypted and the results concatenated Subtopic Cracking Passwords NT/2000 Passwords SAM file in NT/2000 contains the usernames and encrypted passwords C:\windows\system32\config File is locked when OS running Boot to an alternate OS Such as Backtrack Bootable Linux distribution Mount the drive Backup the SAM from the Repair directory Called SAM._ In the repair directory Expand the file use c:\expand same._sam Extract the hashes from the files Use L0phtcrack Redirecting SMB to the Attacker Trick the user into trying SMB authentication against the attacker Send an email with a link Embed code etc.. The SMB authentication will fail But the attacker has the encrypted credentials Tools SMBRelay SMB server to capture usernames and passwords from incoming SMB trac Man in the Middle attacks (MITM) Receives a connection on port 139 Can relay the trac to another server to provide a MITM attack Collects NTLM password hashes to a text file These are then extracted with L0phtcrack SMBGrind Increases speed of L0phtcrack Removes duplication Provides facility to target specific users NBTDeputy Registers a NetBIOS name on the network Helps resolve IP address from NetBIOS name Works well with SMBRelay John the Ripper Command line tools Windows and Unix Cracks both Unix and Windows passwords Extremely fast Resulting Passwords are Case Insensitive May not reflect correct password Countermeasures Enforce 7-12 character alpha-numeric passwords Set the password expiration policy to 30 days Physically isolate and protect the server Use the "syskey" utility Syskey initiates 128 bit encryption for the SAM Monitor all server logs for password attacks Covering Tracks Once intruders have gained access they will need to cover their tracks Intruders will normally install Backdoors so they can always come back to the machine using a covert channel To cover tracks you have to look at general sys admin activities These normally include looking at logs Therefore, logs are always sanitized or cleared down totally. Sometimes, the intruder actually disables logging totally Tools Auditpol.exe Comes with NT/2000 Resource Kit Command line util to find out audit status of a target machine Can be run over the network c:\>auditpol \\<ip address of target> Dumpel.exe Comes with NT/2000 Resource Kit Dumps and event log for a local or remote system Produces a tab delimited CSV file Lets the intruder know what is in the logs eslave.exe Simple tool for clearing the event logs on Windows/2000 Correct privileges are required on the remote system WinZapper Selectively erases records from the Win 2000 security log Command line application Needs admin rights Evidence Eliminator GUI commercial system for Windows Counters all privacy issues Remote Control and Backdoors Spyware can install remote control and backdoors Also known as rootkits Usually these tools oer multiple dierent ways of interacting with a filesystem Screen capture Keystroke logging Microphone enable Log file analysis Tools Spector eBlaster RootKit Software that interacts with the OS Replaces core functions within the OS Good at hiding its existence Available for Windows Unix Countermeasures Tools Anti-Spector Detects and removes Spector from your system Spyguard Detects and removes spy software Hiding Files Two ways of hiding files in NT/2000 Attrib.exe Use Attrib +h [file/directory] NTFS Alternate Data Streaming Allows data to be stored in hidden files that are linked to a normal visible file notepad test.txt:hidden.txt Hides hidden.txt within test.txt test.txt has to already exist Steganography The process of hiding data within images Tools Image Hide Windows App Simple encrypt/decrypt of data No increase in image size Mp3stego Hides information within an .mp3 file Hidden in the mp3 bit stream Snow.exe Whitespace steganography program Hides data in ASCII text by appending whitespace to the end of lines Camera/Shy Windows App Easy to use Hides data in GIF images Comes with its own browser app To view the messages live on the web Countermeasures Stegdetect Automated tool for detecting steganographic content in images Tools makestrm.exe Moves the contents of a file to ids data strem ads_cat Packetstorm utility to write files to the NTFS ADS Contains utilities to add, extract and remove ADS Countermeasures streams Displays NTFS files that have ADS List ADS Lists files with ADS FAT Copy One manual way to remove a stream is to copy the file to a FAT partition, then back. This removes the stream

Certified Ethical Hacking Module 5 Map

Embed Size (px)

DESCRIPTION

CEH Module 5 System Hacking

Citation preview

Page 1: Certified Ethical Hacking Module 5 Map

Certified Ethical HackerModule 5 - System Hacking

Motivation and Study Techniques to help you learn, remember, and pass your technical exams!

CiscoCISSPCEHMore coming soon...

Visit us www.mindcert.com

Subscribe via RSS

Remote Password Guessing

Assuming TCP Port 139 is open

NetBIOS Port

Most effective method o breaking into Windows is Password guessing

Connect to an enumerated shareIPC$

Default Admin sharesC$Admin$

Administrator PasswordThe default admin account is administrator same as root under UNIX

Sometimes has a blank password

Automated password guessing Can use a simple DOS Shell script

Create or use a username/password file

Build a script using the FOR command

FOR /F "token=1, 2*" %1 in (credentials.txt)do net use \\target\IPC$ %i /u: %j

Tools

Legion

Windows applicationAutomates password guessing for NetBIOS sessionsScans multiple Class C addressesManual dictionary attack tool

NTInfoscan (now CIS)

Windows toolNow Cerberus Internet ScannerVulnerability Scanner designed for NT4Will check NetBIOS shares

Countermeasures

Block access to TCP and UDP Ports 135 to 139

Disable WINS client on all adapters

Use strong passwords Or two factor authentication

Log failed logon attempts

Security Log

Event 529 or 539

Look at a logging application VisualLastFrom FoundstoneVisual Log manager

Eavesdropping

Eavesdropping is sniffing the passwords from the network segment Subtopic

To eavesdrop you have to be able to sniff all VLAN traffic

Switch ports by default only see your traffic and broadcasts Have to use a tool to get around this

Hubs forward all frames out of all ports

Some passwords are unencryptedTelnetPOP3etc..

Some passwords are encryptedCollect these passwords and hashes and then run attacks against them offline

Tools

LOphtcrack

Windows ApplicationPassword auditing and recovery tool

SMB Packet capture listens to the local network segment

Captures individual login sessions

Attacks the 24 byte hashed passwordUses either DictionaryOr Brute Force attacks

KerbCrack

Windows command line application

Conists of two programskerbsniff

Listens on the network and captures 2000/XP kerberos logins

kerbcrack Uses dictionary or brute force to crack the password

Denial of ServiceTools

nbname

Sending a NetBIOS name release to the NetBIOS name service (UDP 137) places the name in conflict No longer able to use it

Blocks the client from participating in the NetBIOS networkCarries out a NetBIOS DoS attack

SMBDieCrashes computers running Windows 2000/XP/NTSends a specially crafted SMB request

Privilege Escalation

Once hacker has access to a system

It is important to gain root or administrative level accessMay have gained access with a non admin account

ToolsGetAdmin

Small .exe that adds a user to the local admin groupNeed to logon to the server consoleRun from the command lineOnly works on NT4.0 SP3

hk.exeExposes a LPC Flaw in NTEscalates a non admin user to an admin user

Keystroke Loggers

Log all keyboard activity

TypesHardware

Physical devices that are connected to the keyboard port

SoftwareApplications that have to be installed on a users machine

Tools

KeyghostHardware Keystroke loggerUSB or PS2

IKS Software Keylogger

Windows softwareInvisible to the user

Buffer of 100 keystrokesThen dumps this to a configurable text file on the machine

Password Cracking

Algorithms

Manual Password Cracking

Find a valid userCreate a list of possible passwords

Ken in each password

If the system allows you inSuccess

ElseTry again

Automatic Password Cracking

Find a valid userFind encryption algorithms used

Obtain encrypted passwordsCreate list of possible passwords

Encrypt each word

See if it worksSuccess

ElseTry again

Password Types

Only lettersEasiest to crack

Only numbersOnly special characters

Letters and numbersHarder to crack

Letters and special charactersNumbers and special characters

Letters, numbers, and special charactersMost secure passwords

Password Attacks

Dictionary attackUsing a dictionary of words

Or a wordlist

Brute force attackGoing through all possible combinations

Will always workEventually

Hybrid attackA mixture of dictionary and brute force attacks

Social engineeringAsk the user for there password

Shoulder surfingLook over there shoulder

Dumpster divingTry to find password evidence in trash

Lan Manager Hashes

Windows clients by default send LM and NTLM password hashes

NT/2000/XPWin9x Clients only send LM hashes

ExampleYour password is 123andrew

First converted to Uppercase123ANDREW

Password is padded with null characters to make it a 14 character length123ANDREW_____

The 14 character string is split in two halves123ANDR

EW_____Each string is encrypted and the results concatenated

Subtopic

Cracking Passwords

NT/2000 Passwords

SAM file in NT/2000 contains the usernames and encrypted passwords

C:\windows\system32\config

File is locked when OS running

Boot to an alternate OSSuch as BacktrackBootable Linux distribution

Mount the drive

Backup the SAM from the Repair directoryCalled SAM._In the repair directory

Expand the fileuse c:\expand same._sam

Extract the hashes from the filesUse L0phtcrack

Redirecting SMB to the Attacker

Trick the user into trying SMB authentication against the attacker

Send an email with a linkEmbed code etc..

The SMB authentication will failBut the attacker has the encrypted credentials

Tools

SMBRelay

SMB server to capture usernames and passwords from incoming SMB traffic

Man in the Middle attacks (MITM)

Receives a connection on port 139Can relay the traffic to another server to provide a MITM attack

Collects NTLM password hashes to a text fileThese are then extracted with L0phtcrack

SMBGrindIncreases speed of L0phtcrack

Removes duplicationProvides facility to target specific users

NBTDeputyRegisters a NetBIOS name on the network

Helps resolve IP address from NetBIOS nameWorks well with SMBRelay

John the Ripper

Command line toolsWindows and Unix

Cracks both Unix and Windows passwordsExtremely fast

Resulting Passwords are Case InsensitiveMay not reflect correct password

Countermeasures

Enforce 7-12 character alpha-numeric passwords

Set the password expiration policy to 30 daysPhysically isolate and protect the server

Use the "syskey" utilitySyskey initiates 128 bit encryption for the SAM

Monitor all server logs for password attacks

Covering Tracks

Once intruders have gained access they will need to cover their tracks

Intruders will normally install Backdoors so they can always come back to the machine using a covert channel

To cover tracks you have to look at general sys admin activities

These normally include looking at logsTherefore, logs are always sanitized or cleared down totally.

Sometimes, the intruder actually disables logging totally

Tools

Auditpol.exe

Comes with NT/2000 Resource KitCommand line util to find out audit status of a target machine

Can be run over the networkc:\>auditpol \\<ip address of target>

Dumpel.exe

Comes with NT/2000 Resource KitDumps and event log for a local or remote systemProduces a tab delimited CSV file

Lets the intruder know what is in the logs

eslave.exe

Simple tool for clearing the event logs on Windows/2000

Correct privileges are required on the remote system

WinZapper

Selectively erases records from the Win 2000 security log

Command line applicationNeeds admin rights

Evidence EliminatorGUI commercial system for Windows

Counters all privacy issues

Remote Control and Backdoors

Spyware can install remote control and backdoorsAlso known as rootkits

Usually these tools offer multiple different ways of interacting with a filesystem

Screen captureKeystroke logging

Microphone enableLog file analysis

Tools

Spector

eBlaster

RootKit

Software that interacts with the OSReplaces core functions within the OS

Good at hiding its existence

Available forWindows

Unix

CountermeasuresToolsAnti-SpectorDetects and removes Spector from your system

SpyguardDetects and removes spy software

Hiding Files

Two ways of hiding files in NT/2000

Attrib.exeUse Attrib +h [file/directory]

NTFS Alternate Data Streaming

Allows data to be stored in hidden files that are linked to a normal visible file

notepad test.txt:hidden.txtHides hidden.txt within test.txt

test.txt has to already exist

Steganography

The process of hiding data within images

Tools

Image HideWindows App

Simple encrypt/decrypt of dataNo increase in image size

Mp3stegoHides information within an .mp3 file

Hidden in the mp3 bit stream

Snow.exeWhitespace steganography program

Hides data in ASCII text by appending whitespace to the end of lines

Camera/Shy

Windows AppEasy to use

Hides data in GIF images

Comes with its own browser appTo view the messages live on the web

CountermeasuresStegdetectAutomated tool for detecting steganographic content in images

Toolsmakestrm.exe

Moves the contents of a file to ids data strem

ads_catPacketstorm utility to write files to the NTFS ADS

Contains utilities to add, extract and remove ADS

Countermeasures

streamsDisplays NTFS files that have ADS

List ADSLists files with ADS

FAT Copy

One manual way to remove a stream is to copy the file to a FAT partition, then back.

This removes the stream