Exam Prep Flashcards

(147 cards)

1
Q

CeWL

A

website data collector can harvest emails
Web crawl and worklist generation using CeWL = collects web pages and common docs
cewl.rb -m 8 -w file.xtx —meta_file meat.txt -e –email_file email.tst domain.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Nikto

A

Nikto is a cmd vulnerability scanner

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Wappalyzer

A

Wappalyzer is a website profiler to determine how a site is built

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ZAP

A

ZAP is a web app security scanner

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Merterpreter payload

A

Merterpreter payload injects into a running process, can load new modules into memory of the process to change its functionality, communication to the host is encrypted. Does not interact with hard drive by default and does not require an executable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Redirecting Cookie?

A

Redirecting cookie leads to session hijacking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Vloatility

A

Vloatility netscan looks in memory for listening sockets
svscan is Volatility plugin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Name res order

A

DNS, then LLMNR, then NBT-NS (Netbois)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

BeEf

A

Browser exploit = BeEf
BeEF hook.js can simulate a fake browser update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Msfvenom

A

Msfvenom is part of metasploit to create malicious files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

RITA

A

RITA identifies C2 attacks using network anomalies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Responder.py

A

Responder.py is a script to capture creds using SMB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

4732

A

4732 = account added to local group

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

4688

A

4688 = start of a new process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

4634

A

4634 = log off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

4768

A

4768 = kerb token request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Subfinder

A

Subfinder = passive sub domain finder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Harvester

A

The harvester is similar to Subfinder (sub dom finder), broader scope, and can be active/passive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Can PSID and PID be the same?

A

PSID and PID should not be the same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Netcat port scan command

A

nc -v -w3 -z is a port scan

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

netstat o

A

netstat o shows the process ID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Password Stuffing

A

password stuffing starts with password leaks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Describe a SID

A

The SID has:
A revision level, 1
An identifier authority, 5 (NT Authority)
A domain identifier, 21-1004336348-1177238915-682003330
A relative identifier, 500
S-1-5-21-1004336348-1177238915-682003330-500

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

AWS Bucket Tools (3)

A

GCPbucketBrute does not have the ability to list or download the contents of public Google Compute buckets. Gsutil is a Python application used to perform a wide range of bucket and object management tasks including uploading and downloading content. Bucket_finder enumerates AWS S3 buckets and ntdsutil is used to extract the ntds.dit and system registry hives from a Window domain controller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
skew
skew = interval
26
Why identify empty LanMan Hash?
Running Hashcat is a process that can take several hours or several days, depending on the resources of the system being used. If the LANMAN password hashes contain the string aad3b435b51404eeaad3b435b51404ee, they are empty. There is no need to run Hashcat against the LANMAN hash type.
27
SQL injection
SQL injection attackers start by adding string quotation characters to the user data to see how the system reacts when the data is submitted (i.e., ',", and`).
28
Enumerating blobs - 2 things needed
Enumerating blobs = Account and Container names
29
nmap -A
Nmap has a powerful option called -A. This option enables OS detection, version detection, script scanning, and traceroute. It gives you far more information than a simple syn or TCP connect scan.
30
netstat vs sc vs net view
Netstat -nap will show local ports, PID, and program name on a Linux/Unix host. Sc query will list local services on a Windows host. Net view will get a list of shares from a Windows host.
31
RITA score 1 vs. near 1
Some C2 backdoors have a very strong heartbeat. This is where a backdoor will constantly reconnect to get commands from an attacker at a specific interval. The interval consistency of the heartbeat is the RITA Score, where a value of 1 is a perfect timing repetition for connections between the victim and the server for the duration of the capture period. RITA uses the characteristic of beaconing to identify threats in several ways. One reliable detection mechanism is the presence of a Score value near or at 1. In this case the source IP 10.20.234.50 is likely the victim of an attack and running a C2 backdoor with intermittent (not continuous) beaconing.
32
PICERL
PICERL Preparation, Identification, Containment, Eradication (undoing), Recovery (resumption), and Lessons Learned
33
Dynamic Approach to Incident Response (DAIR)
Dynamic Approach to Incident Response (DAIR) Preparation, Detection and Verification-Triage (waypoints) leads to a loop of scoping, containment, eradication, recovery, and remediation before incident wrap-up. Red Wheel. Waypoints, outcomes, and activities
34
DFIR
DFIR - Digital Forensics and Incident Response
35
Detection
Detection = First decision is always verification, mentions DFIR - Digital Forensics and Incident Response, possible response when looking at logs is inconclusive.
36
Containment
Containment = spot attack, requires proper scoping, isolation, patching, etc. Short-term fix
37
Eradication, Recovery, Remediation
Eradication (undoing) = restoring from backup, assessment Recovery (resume ops) Remediation = root cause, monitor, fixing the cause (long term)
38
PS command to get process starting with power
get-process 'power*' | select-object *
39
get-CimInstance
get-CimInstance - Class Win32_Process //Provides more info like parent process and execution command
40
EncodedCommand
Watch for processes started using -EncodedCommand = CyberChef can be used for decoding
41
Types of encoding
Common encoding are base64, URL encoding, UTF-8, UTF 16 little and big endian
42
PS for listening TCP ports
get-NetTCPConnection -State Listen Local address "::" means listening on all interfaces configured with IPv6 (or 0.0.0.0 for IPV4) 127.0.0.1 is loopback meaning local-only Look fop notepad or other local service with outbound (anything other than listening) on port 80 for exam
43
PS to find services
get-service (or get-CimInstance - Class Win32_Process) //find services
44
PS for registry
get-childItem 'reg key path' or get-itemProperty 'reg key path'
45
PS for local users & groups
get-LocalUser or Get-LocalGroup or get-LocalGroupMember Administrators
46
PS for scheduled tasks
get-ScheduledTask and export-SchedueldTask and get-scheduledTaskInfo
47
ps for Windws events
get-WinEvent -LogName System | where-object -Propeerty Id -EQ 7045
48
Sysinternal tools
Sysinternals = processExplorer, autoruns, sysmon, procMon, TCPview, and procDump
49
TCPDump
TCPDump for packet capture or WinDump on Windows tcpdump -i interface tcpdump -i interface -w file tcpdump -r file -n //Don't resolve host, can be -nnr tcpdump -r file -n -A //Don't resolve host and show human readable ASCII
50
BFP
Berkely Packet Filters (BFP) for tcpdump = primitives and operators
51
Web Proxy tools
Squid, Blue Coat, Forefront TMG
52
Dumping memory passwords
First collect memory with WinPmem run as admin Then analyze with Volatility (python framework) with platform.class.PluginName vol -q -f win10.0.22000.556.raw windows.pslist.PsList
53
List processes using vol
PsList = lists processes PsTree = shows parent tree
54
List network connections
NetScan = network connections
55
CMdLine
CMdLine = process command line
56
2 online malware analysis tools
Virus Total and Hybrid Analysis
57
Compare registry settings
RegShot - compares registry
58
Core Analysis
Core analysis: IDA Pro and optional Hes-Rays decoder, Ghidra by NSA, FOR610, SEC660, SEC760
59
ATT&CK
ATT&CK Adversarial Tactics, Techniques, and Common Knowledge
60
Web search as a discovery tool, Web-based recon
Search engine results, using site: modifier
61
DNS interrogation tools
DNS interrogation with Dig or NSlookup
62
Using dig
dig ANY domain.com dig @nsztml.digi.ninja AXFR domain.com //DNS zone transfer
63
Brute force AXFR
Brute force AXFR using nmap with dns-brute script
64
Using Certificate transparency
Certificate transparency for example crt.sh/?q=domain.com
65
SubFinder
Project discovery Subfinder from https://projectdiscovery.io cn run subdom enumeration subfinder -d domain.com
66
ExifTool
Perl script to extract Windows file metadata, example exiftool file.pdf
67
PowerShell can learn about an Azure hosted domain
AADInternals
68
Recon As Outsider
Invoke-AADIntReconAsOutsider -Domain domain.com | Format-Table
69
DeHashed
DeHashed provides plaintext passwords and PI Ias a service (deper form of HIBP)
70
Showdan
Showdan is an advanced domain search, indexing service banners
71
robots.txt
Disallow search using robots.txt //examples below are pages not indexed //Use high level directories rather than sensitive names Disallow: /registration Disallow: /admin.php Disallow: /app
72
nmap
NMAP is used to discover the network topology (network mapping and port scanning), run as root for best results
73
Sweeping using nmap
Sweeping looks for active hosts using ICMP echo request to an IP range (log the replies) Nmap sweeps before port scanning by default, skip using -Pn Sends TCP SYNC to 443 and TPC ACK to 80 (must be root to ACK to 80) sudo nmap -sn 192.168.1.1-254 //-sn only does discovery. no port scan
74
TCP and UDP port range
TCP and UDP have ports 65,536 each greater than 0
75
SYN ACK vs. RST ACK
SYN ACK = OPEN and RST ACK = CLOSED Reports open, closed, or filtered (no response)
76
nmap switches
-sS = Conventional TCP and -sU = UDP -sV = Version scan -oA to specify target host Nmap SNE (Scripting Engine) Scripts = -sC = Use default scripts --script sctiptName (or All) //accepts wildcards
77
Find service providers
Use builtwith.com to summarize service providers Cloud providers publish IP ranges
78
Masscan
Masscan is fire-and forget, better for massive IP ranges masscan 192.168.1.1/24 -p 22,25,80,443,3389
79
TLS-Scan
Identify TLS servers on TCP 443 and try to request certificates for recon using OpenSSL (one at a time) or TLS-Scan TLS-Scan (Linux) rolls through a list of IPs listening to 443 (TLS Servers) to gather info from certs
80
EyeWitness
EyeWitness takes website screenshots, run using python python3 /opt/eyewitness/EyeWitness.py --web -f urllist.txt --prepend-https
81
SMB
SMB can be scanned and appears as normal TCP 445 traffic SMBV1 started with XP, SMBV3 with Win8 and SMB3.3.3 with Win10/Win2016 Didn't support encryption until SMB3 with lates including pre-auth verification Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol Block SMB over 445 and TCP/UDP 135 and 139 on firewalls
82
Query SMB shares (3)
get-cminstance -class win32_share -ComputerName hostorIP net.exe view \\192.168.1.1 /all //can work on non-windows SMBeagle can be used to search through SMB shares.
83
SMBeagle
SMBeagle can be used to search through SMB shares. smbeagle -c results.csv -n 192.168.1.0/24 -uksmith p pass123 -q SMB also has many CVEs if SMB is not patched. No backoff delay for password guessing
84
Copernic Desktop Search
Copernic Desktop Search also indexes SMB files and does keywork search and OCR
85
Samba
Samba smbclient for File Share Access lest you access and browse shares from CMD is you have credentials, even download and upload files Samba rpcclient (Linux) has over 100 commands over authenticated SMB
86
Enumerate SMB session
Identify sessions using get-SmbSession and close-SmbSession The net.exe command is also available like net view, net share, net session, net use
87
Hayabusa
Hayabusa applies sigma to Windows event logs, Velociraptor
87
Sigma
Sigma - related to snort, SIEM, Yara, YAML
88
THC Hydra
THC Hydra is an online password guessing tool hydra -L users -P passwords ssh://3.231.163.70
89
Password spray
Password spray is a small number of passwords against a large number of accounts
90
PACK
PACK = Password Analysis and Cracking Kit
91
Credential Stuffing
Credential Stuffing = using leaked passwords to attempt success or improved guessing
92
MSOLSPray & FireProx
MSOLSPray is a PowerShell module/command that uses AADSTS response codes for informed password spray Using AWS API Gateway and AAD Smart Lockout for distribution and anonymity FireProx is a python tool for creating AWS API Gateway instances can be used to automate a platform for MOLSpray
93
MSASweep
Using valid account to find MFA and CA gaps using MSASweep
94
get-MsolUSer
get-MsolUSer is PowerShell to inspect individual M365 user license settings for verification
95
Lanman & NT Hash
LANMAN = no larger that 7 bytes, split, all caps padded to 14 bytes, based on DES NT Hash keeps case, can use long passwords, but has no salt, based on MD4, meaning same password = same hash
96
NTDSUTIL
NTDSUTIL can be used to get NTDS.dit and SYSTEM registry hive (used for encryption of the file) They gather both, use activate instance ntdsutil command followed by ifm to create a backup that can be exfilled. Then a script like secretsdump.py can be used to extract the hashes (decrypt)
97
Obtain hashes from Windows client
To obtain hashes from Windows client OS: 1. Use Meterpreter hashdump command against lsass.exe (FROM MEMORY), runs as lsass by running ps -S lsass.exeto get the PD and then migrate into the PID (impersonate) 2. is Mimikatz
98
Break down Windows hash
Windows hashes show as username:userid:LANMAN:NTHASH Empty hashes are useless and are identifiable, possibly a collection issue or disabled account Example: tom:1002:aad3b435b.....:31d6cfe0d...... Keys being aad_b___b and d_cfe_d
99
Identify Linux hash type
Early Linux is DES with no salt (/etc/password), now stronger like MD5 (/etc/shadow/) Look for 2nd colon delimited field in shadow No $ is DES, $1 is MD5, $2 Blowfish, $5 SHA256, and $6 SHA512
100
Hash Rounding
Hash Rounding = increased complexity. MD5 uses 1000, SHA uses 5000
101
Avoid GPU cracking
Password Based Key Derivation Function (PBKDF2) to avoid GPU-based password cracking Also Scrypt, Argon2, Yescrypt
102
Password Cracking
Password Cracking = offline decryption (brute force guessing) Hashcat is main cracking tool
103
Hashcat
Hashcat is main cracking tool -a 0 = wordlist (default) -a 1 = wordlist with append -a 3 = pattern -a 6 = worklist with mask -a 7 = prepend mask Specify -m to define the hash typr or it will try to atuo detect Test the hash type without cracking using --identify hashcat -m 1000 -1 0 hashes.txt words.txt Mask uses ? like ?l for lower case, ?u for upper, ?d for number, and ?s for special Hashcat passwords are sent t the potfile haschcat.potfile You can display cracked with --show, uncreacjed with --left, and user info with --user Hashcat can also use word permutation rules (-r best64.rule)
104
PAM
UNIX has PLuggable Authentication Modules (PAM) for password complexity
105
Cloud storage URLs
Insecure Cloud Storage https://s3.amazonaws.com/bucketname https://www.googleapis.co,/storage/v1/b/bucketname https://accountname.blob.core.windows.net/Containername
106
Bucket Finder
Bucket Finder that looks for open AWS buckets
107
CGPBucketBrute
CGPBucketBrute for Google is python = to download from a google bucket use gsutil from Google
108
Basic Blob Finder
Basic Blob Finder is also python for Azure blobs
109
Netcat
Netcat reads and writes data across networks (has variants) Client mode starts a connection to a specific port, send input to network and response to output Messages are sent to standard error stderr Listen mode waits for a connection on a specific port (option -l) Listener to client; listener: nc -1 -p port < filename client: nc listenerIP port > filename Push file from client to listener listener: nc -1 -p port > filename client: nc listenerIP port < filename WATCH the <> closely
110
Netcat port scanning:
nc -v -w3 -z targetIP start-endPort Netcat backdoor shell examples (-e is execute): nc -l -p port -e cmd.exe nc -l -p port -e /bin/sh For listening, -l is listedn once and -L on windows will restart
111
Netcat relay
Netcat relay used to hop systems, requires named pipe on pivot system (mkfifo pipname on Linux)
112
Metasploit Framework, modules, and interfaces
Metasploit Framework - collection of tools, runs on Linux, select exploit and payload to run on target Four modules types: exploits. payloads, aux modules, and post exploit modules Interfaces are console, command, web, and GUI (Armitage) Search is an important command
113
Merterpreter
Merterpreter is a general=purpose Metasploit payload for gaining access
114
Protect Linux
Use SeLinux or AppArmor to protect Linux, patch, use EDR, filter outbound traffic, hunt for long URLs
115
Drive-by vs. Watering Hole
Drive-by or client-side is attacking normal web browsing, called watering hole if targeted Watering hole may involve Windows files with marcos or fake installers
116
MsfVenom
Metasploit also has MsfVenom that convers any payload into a standalone file (related to templating) MsVenom -X can embed payload into legitimate executable
117
Msfconsole
Msfconsole is used to prepare a reverse TCP connection (listener)
118
Browser Exploitation Framework (BeEf)
Browser Exploitation Framework (BeEf) used for browser exploits, XSS attacks, and social engineering like fake flash update BeEf runs as sudo on Linux, collection of browser attack tools
119
Command Injection
Command Injection = web app sends user input to a command shell and attacker can try to appends a 2nd command using ; on Linux or & on Windows. Can arrive sa HPPT Get or Post. Any system that accepts user input. Attack against a server. Might involve -h, ; , & , echo, or 'injected', manipulating value following id= as example, or a command like ping
120
Cross-Site Scripting XSS
Cross-Site Scripting XSS is an attack against users, attacks vulnerability in server input or output, changing what is displayed to the user, could tell the client browser to run code or redirect the cookie location, often JavaScript or HTML
121
Stored vs. Reflected XSS
Stored XSS Attack = uploads or stores malicious code on server, drive-by (opportunistic) Reflected XSS Attack = uses vulnerability in URL of a page (GET-based), sends URL to victim
122
Identify XSS vulnerability
XSS demonstrated as page running Test for XSS vulnerability by fuzzing input like
tag or '';!--"=&{()} will return alert('XSS') if bad or something close to the input text if safe
123
Prevent XSS
Encode meta character output using (& or &) and limit cookie with HTTPOnly tag Servers set Content Security Policy (CSP) header
124
SQL Injection
SQL Injection exploits input validation to set or retrieve unintended info from DB Test using ' " ` % %% -- /* //) ; for example blake' OR 'a'='a Tautology is always true condition retunes all records like a=a Tripping an error code can also reveal info about the server or files. UNION followed by a new Select is commonly used once vulnerability is verified
125
SQL Injection tools
Automated options include a python script called sqlmap, Burp Suite Pro, Acunetix Web Vulnerability Scanner Testing can be risky, could delete data, backup before
126
sqlmap
1. Always us a valid, non-error-generating URL 2. Always put the URL in quotes Possible EXAM question: sqlmap -u https://msn.com //invalid without quotes Also followed by --dbs = enumerate databases and -D dbName --tables to list tables followed by --colums or --dump (display)
127
Cloud DB vulnerable to SQL attack
Cloud database remain vulnerable to SQL injection attacks, does not escape, no Object Relational Mapping (ORM) system
128
SSFR
Server-Side Request Forgery (SSRF) allows attacker to change what is requests from a server to disclose Instance Metadata (IMDS), protected files on the host, URL calls file location, change the file to local path like file:////etc/shadow Can be evaluated using curl Access IMDS using virtual server address = curl http://169.254.169.10/latest/user-data AWS IMDSv1 has a known SSRF vuln used for credential extraction Some like Azure mitigate using special header requirement
129
Endpoint Security Bypass
Endpoint Security Bypass = evading signature detection, encoding, using permitted tools
130
DefenderCheck
DefenderCheck splits file into pieces until it cannot be detected (high/low strategy)
131
Code wrapping
Code wrapping to build legitimate code around malware, possibly using IronPython, often layering among multiple languages
132
LOTL Example using sysinternals
Example provided was using sysinternals procdump to get LSASS dump to use with Mimikatz on another system .\procdump.exe -accepteula -ma lsass.exe lsass dump
133
Bypass AppLocker
Applocker can be bypassed by unusual execution method like InstallUtil /U shellcode.exe (.Net Install Utility)
134
On Linux search for SETUID files
On Linux search for SETUID files= find / -perm -4000 -uid 0
135
Pivoting
Pivoting, often setting up a proxy on one system to reach another Merterpreter has portfwd and route that can establish a proxy Merterpreter doesn't have port scanner but can use apr_scanner or Metasploit has nmap, db_nmap, and auxiliary scanner modules. Identify the next hop systems and port scan. Lateral movement is exploiting targets through pivots
136
Linux port forwarding
On Linux this could be SSH port forwarding using SSH -L port1:IP:port2 Linux can also use netcat named pipes discussed earlier
137
Windows pivoting
Windows can use netsh interface portproxy but requires admin
138
Hijacking
Hijacking attacks (impersonation), exploiting weak protocols, like local MTM, broadcasting service requests and injecting responses
139
Responder
Responder is a python script to exploit (Hijacking) LLMNR, can be used to get NTLMv2 auth hash from network response
140
After pivoting comes...
Next is persistence to regain access, avoid detection, preserve privileges, and reestablish access at will
141
Prevent Hijacking
Disable; LLMNR and NBT-NS, disable mDNS, and SMB lower than 3.1.1
142
Persistence method
One options is to create a new user account merterpreter> execute -f 'net user /add accessmgmt password123" merterpreter> execute -f 'net localgroup administators /add accessmgmt" Metasploit and others offer various persistence options like a persistent service WIM can subscribe to events Also discusses golden ticket attack Web shells could provide persistence, mod to web page or file
143
Persist with event subscriptions
WIM can subscribe to events and execute code like scheduled tasks using mofcomp.exe and can listen on a port for a specific IP as an event trigger. Merterpreter watched for Sec logon failed event 4625 by default.
144
Cloud persistence
Cloud persistence could be new resources like VM function, container, new access keys, cloud accounts
145
Identify autoruns
Look for autoruns, events 4624, 4634, 4672, 4732, 4648, 4688, 4697, registry startup, use get-ciminstance to detect event subscribers
146
RITA
Real Intelligence Threat Analytics (RITA) uses statistical data over time for hunting, used for offline assessment, ingests Zeek logs Look for long connection durations, consistent packet size, interval, jitter, etc.