Incident handling
aim to know the attackers' tactics, techniques, and procedures
The preparation phase covers the readiness of an organization against an attack
The detection phase covers everything related to detecting an incident and the analysis process of the incident
This phase also covers hunting for the unknown threat within the organization.
Containment, Eradication, and Recovery actions needed to prevent the incident from spreading and securing the network.
steps taken to avoid an attack from spreading into the network
isolating the infected host
clearing the network from the infection traces
gaining control back from the attack
Post-Incident Activity / Lessons Learnt
includes identifying the loopholes in the organization's security posture
improving so that the attack does not happen next time
identifying weaknesses that led to the attack
adding detection rules so that similar breach does not happen again
training the staff if required
Cyber Kill Chain
Map the attacker's activity in each phase during this Investigation [ https://static1.squarespace.com/static/5b636d897c932781e8002af9/t/6018dc12e670955289be56d6/1612241938544/Cyber+Kill+Chain+Report+for+APT+Group+PoisonIvy.pdf ]
Reconnaissance
Weaponization
Delivery
Exploitation
Installation
Command & Control
Actions on Objectives
log sources showing visibility into both network-centric and host-centric activities
SPLUNK [ index=botsv1 ]
click on the Data summary and navigate the available tabs to get the information
wineventlog
It contains Windows Event logs
winRegistry
It contains the logs related to registry creation / modification / deletion etc.
XmlWinEventLog
It contains the sysmon event logs. It is a very important log source from an investigation point of view.
fortigate_utm
It contains Fortinet Firewall logs
iis
It contains IIS web server logs
Nessus:scan
It contains the results from the Nessus vulnerability scanner.
Suricata
It contains the details of the alerts from the Suricata IDS. This log source shows which alert was triggered and what caused the alert to get triggered— a very important log source for the Investigation.
stream:http
It contains the network flow related to http traffic.
stream: DNS
It contains the network flow related to DNS traffic.
stream:icmp
It contains the network flow related to icmp traffic.
Reconnaissance Phase
Reconnaissance is an attempt to discover and collect information about a target
start our analysis by examining any reconnaissance attempt against the webserver
imreallynotbatman.com
First task is to identify the IP address attempting to perform reconnaissance activity on our web server.
stream:http, which contains the http traffic logs
examine the
src_ip
This query will only look for the term imreallynotbatman.comin the stream:http log source
We have narrowed down the results to only show the logs from the source IP

This query will show the logs from the suricata log source that are detected/generated from the source IP 40.80.248.42
what do we need to do to validate the scanning attempt? Simple, dig further into the weblogs.
The attacker needs to exploit the vulnerability to gain access to the system/server.
We found two IP addresses from the reconnaissance phase with sending requests to our server.
One of the IPs
40.80.148.42was seen attempting to scan the server with IP 192.168.250.70.The attacker was using the web scanner Acunetix for the scanning attempt.
Exploitation Phase

index=botsv1 imreallynotbatman.com sourcetype=stream* | stats count(src_ip) as Requests by src_ip | sort - Requests
narrow down the result to show requests sent to our web server, which has the IP 192.168.250.70
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70"
This query will look for all the inbound traffic towards IP 192.168.250.70.
Check what methods were used
http_method
index=botsv1 imreallynotbatman.com sourcetype=stream:http dest_ip="192.168.250.70" http_method=POST
src_ip
form_data
http_user_agent
uri
uri_path
http_referrer
Establish CMS
Establish Log-on page of the CMS
examining the traffic coming into this admin panel for a potential brute-force attack.
index=botsv1 imreallynotbatman.com sourcetype=stream:http dest_ip="192.168.250.70" uri="/joomla/administrator/index.php"
We are going to add
uri="/joomla/administrator/index.php"in the search query to show the traffic coming into this URI.Check for form_data
contains the requests sent through the form on the admin panel page
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" http_method=POST uri="/joomla/administrator/index.php" | table _time uri src_ip dest_ip form_data
We will add this ->
| table _time uri src dest_ip form_datato create a table

attacker from the IP
23.22.63.114Was trying to guess the password by brute-forcing and attempting numerous passwords.The time elapsed between multiple events also suggests that the attacker was using an automated tool
Extracting Username and Passwd Fields using Regex
use Regex in the search to extract only these two fields
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" http_method=POST uri="/joomla/administrator/index.php" form_data=usernamepasswd* | table _time uri src_ip dest_ip form_data
extract all the password values found against the field passwd in the logs
rex field=form_data "passwd=(?<creds>\w+)"index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" http_method=POST form_data=usernamepasswd* | rex field=form_data "passwd=(?\w+)" | table src_ip creds
Investigate user agents
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" http_method=POST form_data=usernamepasswd* | rex field=form_data "passwd=(?\w+)" |table _time src_ip uri http_user_agent creds
Python brute-force script used
Once the attacker has successfully exploited the security of a system, he will try to install a backdoor or an application for persistence or to gain more control of the system.
Installation phase
found evidence of the webserver
iamreallynotbatman.comgetting compromised via brute-force attack
attacker using the python script to automate getting the correct password
the attacker used different IP for the attack and the IP to log in to the server
What I will do:
Investigate any payload / malicious program uploaded to the server from any attacker's IPs
Check is there anything installed into the compromised server
Narrow down any http traffic coming into our server 192.168.250.70 containing the term ".exe." This query may not lead to the findings, but it's good to start from 1 extension and move ahead.
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" *.exe

find if any of these files came from the IP addresses that were found to be associated with the attack. c_ip is the client IP.
index=botsv1 sourcetype=stream:http dest_ip="192.168.250.70" *.exe "part_filename{}"="3791.exe" c_ip="40.80.148.42"

We have 1 event. Okay but what did this file execute?
Switch now to host-centric logs.
Narrow down logs to .exe file

index=botsv1 "3791.exe" What are sysmon eventID's meanings?

Has been executed
Action on Objective
start our investigation by examining the Suricata log source and the IP addresses communicating with the webserver 192.168.250.70.
index=botsv1 dest=192.168.250.70 sourcetype=suricata
Check for "source" ip.

None, see if any communication originates from the server.
index=botsv1 src=192.168.250.70 sourcetype=suricata
Check "dest_ip"

Web servers do not originate the traffic
The browser or the client would be the source, and the server would be the destination
Check each ip "url"

Figure where jpeg came from index=botsv1 url="/poisonivy-is-coming-for-you-batman.jpeg" dest_ip="192.168.250.70" | table _time src dest_ip http.hostname url

jpeg poisonivy-is-coming-for-you-batman.jpegwas downloaded from the attacker's hostprankglassinebracket.jumpingcrab.comthat defaced the site.or click on the .jpeg and check for "src"
Attacker uploaded the file to the server before defacing it
Attacker used a Dynamic DNS to resolve a malicious IP
Examine the network-centric log sources
fortigate_utm to review the firewall logs
Objective: find the IP that the attacker decided the DNS
Command and Control
index=botsv1 sourcetype=fortigate_utm"poisonivy-is-coming-for-you-batman.jpeg"
Another log source
index=botsv1 sourcetype=stream:http dest_ip=23.22.63.114 "poisonivy-is-coming-for-you-batman.jpeg" src_ip=192.168.250.70

This is CNC server that has been contacted after host has been compromised.
Check DNS log stream.
Create Malware / Malicious document to gain initial access / evade detection etc.
Establish domains similar to the target domain to trick users.
Create a Command and Control Server for the post-exploitation communication/activity etc.
Found a domain
prankglassinebracket.jumpingcrab.comassociated with this attack.Object: find the IP address tied to the domains that may potentially be pre-staged to attack Wayne Enterprise.
Weaponization
https://www.virustotal.com/graph/http%253A%252F%252Fprankglassinebracket.jumpingcrab.com%252F

a lot of data there 

Check others below too www.threatminer.org
ipinfo.io
www.hybrid-analysis.com
www.lookip.net
static1.squarespace.com
whatismyip.live
any.run
po1s0n1vy.com


I'll leave this hint here, so that you can practice and find the real one. Do not use writeups that are there in the wild. Try to develop skills. This is why I'm not providing solutions, only notes. 
General OSINT sites:
Virustotal
ThreatMiner
Hybrid-Analysis
Last updated











