Security Analyst Notes: Things to Remember
Over the last two years during my training, I've been taking notes along the way on all different topics that have been focused on defensive security. Recently I decided to clean up and compile the mountain of .txt files that I have, so they are both easier to reference and so I can share them with people looking to foster a career as a security analyst like me. ?
?
I plan to add more to this list in the future as I continue to aggregate the information that I've recorded and if anyone out there has anything that they believe I should add to this list, I'd greatly appreciate your input and or feedback.?
___________________________________________________
Alerts
Adversary tempo - many adversaries will execute commands and then wait a period of time (>= 30 - 60 mins) before executing commands again.
Phishing
SMTP header analysis-
What time was the email sent? Check geolocation of IP if possible.
?
?
Attachments-
Compromised-
Inform staff first > MS Exchange Online > Search sender/subject > Delete all instances of this email
?
Lock/disable account > reset password > inform account owner > continuously monitor account
Compose Phishing Rules-
?
Stop Spam-
?
OS Analysis
Windows-
Command and Scripting Interpreter Used by Adversaries:
MS IR Playbooks:
?
Is something bogging down the system? CPU/RAM spikes? A spike in traffic leaving the endpoint? Look for strange behavior such as suspicious child processes, calls out to Ips/domains or odd connections.
?
Get a file hash:
Monitor persistence by checking:
Get-WinEvent -FilterHashtable @{logname='system'; id=7045} | format-list
? schtasks /query /fo list /v
?
? netstat -a
?
? Get-ChildItem -Path "c:\" -File -Recurse -Include "*.exe", "*.bat" | Where-Object {$_.CreationTime -ge (Get-Date).AddDays(-14)}
?
Log Analysis:
?
?wevtutil qe Security /q:*/System/EventID=4624 /c:10????
*This will display the last 10 successful logons from the security log.
?
? Get-WinEvent -LogName Security -FilterXPath '*/System/EventID=4648' -Oldest -MaxEvents 1???
*This will show the oldest event where a logon was attempted using explicit credentials from the security log.
Sysmon Event IDs:
1 - Process Creation
2 - Process Changed A File Creation Time
3 - Network Connections
4, 5 - Sysmon Service Changes
6 - Driver Loaded
7 - Image Loaded
8 - CreateRemoteThread
9 - RawAccessRead
10 - ProcessAccess
11 - File Creation Events
12, 13, 14, - Registry Objects
15 - FileCreateStreamHash
16 - Sysmon Config Change
17, 18 - Pipe Events
19, 20, 21 - WMI Events
22 - DNS Events
23 - FileDelete
24 - Clipboard Changes
25 - Process Tampering
26 - File Deletion Detected
WinEvent IDs:
?
Account Management-
4720 - A user account was created.
4722 - A user account was enabled.
4724 - An attempt was made to reset an accounts password.
4728, 4732, 4756 - Group membership changes.
?
Authentication-
4776 - The domain controller attempted to validate the credentials for an account.
4771 - This event is logged on domain controllers only and only failure instances of this event are logged ( Kerberos pre-authentication failed ).
4768 - This event is logged on domain controllers only and both success and failure instances of this event are logged ( A Kerberos authentication ticket TGT ) was requested.
?4769 - Windows uses this event ID for both successful and failed service ticket requests ( A Kerberos service ticket was requested ).
?
Event Log Tampering-
1102 - Whenever Windows Security audit log is cleared, event ID 1102 is logged.
104 - This event is logged when the log file was cleared.
?
Network-
5140 - A network share object was accessed
5145 - Network share object was checked to see whether client can be granted desired access.
?
Scheduled Task-
4698 - A scheduled task was created.
4702 - A scheduled task was updated.
?
Services-
4697 - A service was installed on the system.
7045 - Created when new services are created on the local Windows machine.
7034 - The service terminated unexpectedly.
7036 - The Windows Firewall/Internet Connection Sharing (ICS) service entered the stopped state or , The Print Spooler service entered the running state.
7040 - The start type of the IPSEC services was changed from disabled to auto start.
?
Sessions-
4624 - An account was successfully logged on.
4625 - An account failed to log on.
4634, 4647 - User initiated logoff / An account was logged off.
领英推荐
4648 - A logon was attempted using explicit credentials.
4672 - Special privileges assigned to new logon.
?
Linux:
Users and Group Modification-
Has there been a new user added? Group modified??Password changed?
grep useradd /var/log/auth.log
grep passwd /var/log/auth.log
grep "Failed password" /var/log/auth.log
last
cat /etc/sudoers
?
Mounts-
?
Persistence-
?
cat?/etc/crontab
cat /var/spool/cron/crontabs/*
find /?-name "authorized_keys"
Files-
find /tmp -user <user name>
find / -name 'cat.jpg' -newermt "2023-02-15 00:00:00" ! -newermt "2023-02-15 23:59:00"
?
Search for Web Shells-
?
Network:
DHCP-
Rogue devices can be discovered by searching for hostnames that do not adhere to the naming conventions of the organization or searching for MAC OUIs that are different from the companies corporate hardware.
HTTP-
Manual http header analysis:
?
IDOR:
?
SQL Injection:
?
?
XSS (Reflected):
?
?
?
LFI:
?
?
?
Command Injection:
?
ICMP-
?
ICMP can be used for data exfiltration and can transport 65507 bytes of data.
?
DNS-
?
Is the DNS request malicious? Is it querying a TLD or a free domain?
?
Is there a ton of requests from one source IP?
?
Check the age and reputation of the domain:
?
How long is the domain? Is there entropy in the name? Is the domain > 72 characters?
*Many CDNs have very long sub/domains
?
C2 Communication / Data Exfiltration-
?
DNS Tunneling-
?
Utilize software solutions like AC Hunter to monitor spikes in DNS queries to a single IP and other beaconing.
?
Check CNAME and TEXT files for nonsense, random, and long subdomains.
B.S. in Computer Science | Security + | CC (ISC2) | Cybersecurity Enthusiast
1 年Very helpful. Thank you for the share.
Triage Security Engineer | PJPT (TCM Security) | TryHackMe Top 1% | Immersive Top 1%
1 年This is a wonderful set of notes. Fantastic job Daniel! ?? Thank you for the share!