Analyzing auth.log and Playing with Grok Filters - HTB Sherlocks - Brutus

IppSec · Beginner ·🛡️ AI Safety & Ethics ·1y ago
00:00 - Introduction 02:10 - Going over the wtmp file, showing utmpdump and last 04:30 - Start of talking about the auth.log, grabbing all the programs (ssh, cron, etc) so we know what is in the log 08:15 - Question 1: Identify the bruteforce use grep with oP to extract all IP Addresses with login failures 11:50 - Question 2: Looking at successful logins and seeing the malicious IP logged into root 12:45 - Question 3: Looking at login/logoff times, getting the login time from wtmp as it is 1 second after the login 15:15 - Question 4: Grabbing the session number from logins which is part of systemd-logind 18:00 - Question 5: Finding the useradd line in the auth.log file 19:00 - Question 6: Looking at the MITRE Attack Framework and getting the ID-related to creating users for persistence 20:10 - Question 7: Using Last to look at how long a session was active for 21:25 - Question 8: Sudo is the only program in auth.log showing commands being ran, looking at what was run 23:10 - BEYOND ROOT: Talking about how we can create grok filters to convert this log to json, we will use Go-Grok 27:30 - Using an online Grok Debugger to manually create a Grok Rule, this is like regex101 32:00 - Showing how to do an "Optional Match" so we can match lines that are mostly alike 33:20 - Start of creating our program, showing how to add patterns and definitions 42:50 - Adding SSH_AUTH to our program 44:40 - Adding the New/Remove session lines to a grok filter 53:30 - Reading the auth.log in our golang program so we can parse all the lines we created rules for 54:40 - Using JQ to do some searches and create the desired output 1:02:30 - Doing some lazy searching with JQ and grep
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from IppSec · IppSec · 0 of 60

← Previous Next →
1 HHC2016 - Analytics
HHC2016 - Analytics
IppSec
2 HackTheBox - October
HackTheBox - October
IppSec
3 HackTheBox - Arctic
HackTheBox - Arctic
IppSec
4 HackTheBox - Brainfuck
HackTheBox - Brainfuck
IppSec
5 HackTheBox - Bank
HackTheBox - Bank
IppSec
6 HackTheBox - Joker
HackTheBox - Joker
IppSec
7 HackTheBox - Lazy
HackTheBox - Lazy
IppSec
8 Camp CTF 2015 - Bitterman
Camp CTF 2015 - Bitterman
IppSec
9 HackTheBox - Devel
HackTheBox - Devel
IppSec
10 Reversing Malicious Office Document (Macro) Emotet(?)
Reversing Malicious Office Document (Macro) Emotet(?)
IppSec
11 HackTheBox - Granny and Grandpa
HackTheBox - Granny and Grandpa
IppSec
12 HackTheBox - Pivoting Update: Granny and Grandpa
HackTheBox - Pivoting Update: Granny and Grandpa
IppSec
13 HackTheBox - Optimum
HackTheBox - Optimum
IppSec
14 HackTheBox - Charon
HackTheBox - Charon
IppSec
15 HackTheBox - Sneaky
HackTheBox - Sneaky
IppSec
16 HackTheBox - Holiday
HackTheBox - Holiday
IppSec
17 HackTheBox - Europa
HackTheBox - Europa
IppSec
18 Introduction to tmux
Introduction to tmux
IppSec
19 HackTheBox - Blocky
HackTheBox - Blocky
IppSec
20 HackTheBox - Nineveh
HackTheBox - Nineveh
IppSec
21 HackTheBox - Jail
HackTheBox - Jail
IppSec
22 HackTheBox - Blue
HackTheBox - Blue
IppSec
23 HackTheBox - Calamity
HackTheBox - Calamity
IppSec
24 HackTheBox - Shrek
HackTheBox - Shrek
IppSec
25 HackTheBox - Mirai
HackTheBox - Mirai
IppSec
26 HackTheBox - Shocker
HackTheBox - Shocker
IppSec
27 HackTheBox - Mantis
HackTheBox - Mantis
IppSec
28 HackTheBox - Node
HackTheBox - Node
IppSec
29 HackTheBox - Kotarak
HackTheBox - Kotarak
IppSec
30 HackTheBox - Enterprise
HackTheBox - Enterprise
IppSec
31 HackTheBox - Sense
HackTheBox - Sense
IppSec
32 HackTheBox - Minion
HackTheBox - Minion
IppSec
33 VulnHub - Sokar
VulnHub - Sokar
IppSec
34 VulnHub - Pinkys Palace v2
VulnHub - Pinkys Palace v2
IppSec
35 HackTheBox - Inception
HackTheBox - Inception
IppSec
36 Vulnhub - Trollcave 1.2
Vulnhub - Trollcave 1.2
IppSec
37 HackTheBox - Ariekei
HackTheBox - Ariekei
IppSec
38 HackTheBox - Flux Capacitor
HackTheBox - Flux Capacitor
IppSec
39 HackTheBox - Jeeves
HackTheBox - Jeeves
IppSec
40 HackTheBox - Tally
HackTheBox - Tally
IppSec
41 HackTheBox - CrimeStoppers
HackTheBox - CrimeStoppers
IppSec
42 HackTheBox - Fulcrum
HackTheBox - Fulcrum
IppSec
43 HackTheBox - Chatterbox
HackTheBox - Chatterbox
IppSec
44 HackTheBox - Falafel
HackTheBox - Falafel
IppSec
45 How To Create Empire Modules
How To Create Empire Modules
IppSec
46 HackTheBox - Nightmare
HackTheBox - Nightmare
IppSec
47 HackTheBox - Nightmarev2  - Speed Run/Unintended Solutions
HackTheBox - Nightmarev2 - Speed Run/Unintended Solutions
IppSec
48 HackTheBox - Bart
HackTheBox - Bart
IppSec
49 HackTheBox -  Aragog
HackTheBox - Aragog
IppSec
50 HackTheBox - Valentine
HackTheBox - Valentine
IppSec
51 HackTheBox - Silo
HackTheBox - Silo
IppSec
52 HackTheBox - Rabbit
HackTheBox - Rabbit
IppSec
53 HackTheBox - Celestial
HackTheBox - Celestial
IppSec
54 HackTheBox - Stratosphere
HackTheBox - Stratosphere
IppSec
55 HackTheBox - Poison
HackTheBox - Poison
IppSec
56 HackTheBox - Canape
HackTheBox - Canape
IppSec
57 HackTheBox - Olympus
HackTheBox - Olympus
IppSec
58 HackTheBox - Sunday
HackTheBox - Sunday
IppSec
59 HackTheBox - Fighter
HackTheBox - Fighter
IppSec
60 HackTheBox - Bounty
HackTheBox - Bounty
IppSec

Related AI Lessons

Start Here: YOSHIMI Nakane / Human Dignity Architect
Learn about YOSHIMI Nakane, a Human Dignity Architect, and the concept of designing human recognition, dignity, and value in the age of AI
Medium · AI
What Is AI Jailbreaking? The Security Challenge Reshaping LLMs
Learn about AI jailbreaking, a security challenge that threatens LLMs by bypassing safety guardrails and content filters, and why it matters for AI development
Dev.to AI
AI Is Forcing Us to Redefine What It Means to Be Smart
AI is redefining what it means to be smart, shifting focus from technical problem-solving to deeper human intelligence
Medium · AI
Gait Recognition: The Next Frontier in Biometric Security using AI
Learn how gait recognition using AI is revolutionizing biometric security and why it matters for cybersecurity and identity management
Medium · Cybersecurity

Chapters (20)

Introduction
2:10 Going over the wtmp file, showing utmpdump and last
4:30 Start of talking about the auth.log, grabbing all the programs (ssh, cron, etc
8:15 Question 1: Identify the bruteforce use grep with oP to extract all IP Address
11:50 Question 2: Looking at successful logins and seeing the malicious IP logged in
12:45 Question 3: Looking at login/logoff times, getting the login time from wtmp as
15:15 Question 4: Grabbing the session number from logins which is part of systemd-l
18:00 Question 5: Finding the useradd line in the auth.log file
19:00 Question 6: Looking at the MITRE Attack Framework and getting the ID-related t
20:10 Question 7: Using Last to look at how long a session was active for
21:25 Question 8: Sudo is the only program in auth.log showing commands being ran,
23:10 BEYOND ROOT: Talking about how we can create grok filters to convert this log
27:30 Using an online Grok Debugger to manually create a Grok Rule, this is like reg
32:00 Showing how to do an "Optional Match" so we can match lines that are mostly al
33:20 Start of creating our program, showing how to add patterns and definitions
42:50 Adding SSH_AUTH to our program
44:40 Adding the New/Remove session lines to a grok filter
53:30 Reading the auth.log in our golang program so we can parse all the lines we cr
54:40 Using JQ to do some searches and create the desired output
1:02:30 Doing some lazy searching with JQ and grep
Up next
AI Management Essentials: Integrating ISO 42001 & ISO 23894
Coursera
Watch →