Analyzing auth.log and Playing with Grok Filters - HTB Sherlocks - Brutus
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 sys…
Watch on YouTube ↗
(saves to browser)
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
Playlist
Uploads from IppSec · IppSec · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
HHC2016 - Dungeon
IppSec
HHC2016 - Terminal Speedrun
IppSec
HHC2016 - Ads
IppSec
HHC2016 - Debug
IppSec
HHC2016 - Exception
IppSec
HHC2016 - Analytics
IppSec
HHC2016 - Getting Coins
IppSec
HackTheBox - Popcorn
IppSec
HackTheBox - October
IppSec
HackTheBox - Arctic
IppSec
HackTheBox - Tenten
IppSec
HackTheBox - CronOS
IppSec
HackTheBox - Brainfuck
IppSec
HackTheBox - Beep
IppSec
HackTheBox - Bastard
IppSec
HackTheBox - Bank
IppSec
HackTheBox - Joker
IppSec
HackTheBox - Haircut
IppSec
HackTheBox - Lazy
IppSec
Camp CTF 2015 - Bitterman
IppSec
HackTheBox - Devel
IppSec
Reversing Malicious Office Document (Macro) Emotet(?)
IppSec
HackTheBox - Granny and Grandpa
IppSec
HackTheBox - Pivoting Update: Granny and Grandpa
IppSec
HackTheBox - Optimum
IppSec
HackTheBox - Charon
IppSec
HackTheBox - Sneaky
IppSec
HackTheBox - Holiday
IppSec
HackTheBox - Apocalyst
IppSec
HackTheBox - Europa
IppSec
Introduction to tmux
IppSec
HackTheBox - Blocky
IppSec
HackTheBox - Nineveh
IppSec
HackTheBox - Jail
IppSec
HackTheBox - Blue
IppSec
HackTheBox - Calamity
IppSec
HackTheBox - SolidState
IppSec
HackTheBox - Shrek
IppSec
HackTheBox - Mirai
IppSec
HackTheBox - Shocker
IppSec
HackTheBox - Mantis
IppSec
HackTheBox - Node
IppSec
HackTheBox - Kotarak
IppSec
HackTheBox - Enterprise
IppSec
HackTheBox - Sense
IppSec
HackTheBox - Minion
IppSec
VulnHub - Sokar
IppSec
VulnHub - Pinkys Palace v2
IppSec
HackTheBox - Inception
IppSec
Vulnhub - Trollcave 1.2
IppSec
HackTheBox - Ariekei
IppSec
HackTheBox - Bashed
IppSec
HackTheBox - Flux Capacitor
IppSec
HackTheBox - Jeeves
IppSec
HackTheBox - Tally
IppSec
HackTheBox - CrimeStoppers
IppSec
HackTheBox - Fulcrum
IppSec
HackTheBox - Chatterbox
IppSec
HackTheBox - Falafel
IppSec
HackTheBox - Nibbles
IppSec
DeepCamp AI