soc-practicals 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- soc_practicals/__init__.py +9 -0
- soc_practicals/__main__.py +5 -0
- soc_practicals/notes/HTTPS and Windows System Exploration +178 -0
- soc_practicals/notes/Practical 1 /321/202/320/220/320/243 Encryption, Decryption and Hashing" +139 -0
- soc_practicals/notes/Practical 10 /321/202/320/220/320/243 Install and Configure Graylog on Linux" +192 -0
- soc_practicals/notes/Practical 2 /321/202/320/220/320/243 Network Traffic Analysis and Attack Investigation" +183 -0
- soc_practicals/notes/Practical 3 /321/202/320/220/320/243 Snort, Firewall Rules, PCAP Analysis and DNS Traffic" +144 -0
- soc_practicals/notes/Practical 5 /321/202/320/220/320/243 Attack on a MySQL Database Using a PCAP File" +100 -0
- soc_practicals/notes/Practical 6 /321/202/320/220/320/243 Create Your Own Syslog Server" +76 -0
- soc_practicals/notes/Practical 7 /321/202/320/220/320/243 Configure Linux to Send Syslog Messages to a Syslog Server" +90 -0
- soc_practicals/notes/Practical 8 /321/202/320/220/320/243 Install and Run Splunk on Linux" +70 -0
- soc_practicals/notes/Practical 9 /321/202/320/220/320/243 Install and Configure ELK Stack on Linux" +182 -0
- soc_practicals-0.1.0.dist-info/METADATA +37 -0
- soc_practicals-0.1.0.dist-info/RECORD +15 -0
- soc_practicals-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Aim: To examine HTTP and HTTPS network traffic and explore Windows processes, threads, handles and registry entries.
|
|
2
|
+
|
|
3
|
+
Requirements:
|
|
4
|
+
- CyberOps Workstation VM
|
|
5
|
+
- Wireshark
|
|
6
|
+
- tcpdump
|
|
7
|
+
- Windows operating system
|
|
8
|
+
- Windows Sysinternals Suite
|
|
9
|
+
- Process Explorer
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
A. Using Wireshark to examine HTTP and HTTPS traffic
|
|
13
|
+
Part 1: Capture and view HTTP traffic
|
|
14
|
+
|
|
15
|
+
Step 1: Start the virtual machine
|
|
16
|
+
|
|
17
|
+
Start CyberOps Workstation VM.
|
|
18
|
+
|
|
19
|
+
Login:
|
|
20
|
+
Username: analyst
|
|
21
|
+
Password: cyberops
|
|
22
|
+
|
|
23
|
+
Step 2: Check network interfaces
|
|
24
|
+
|
|
25
|
+
Open Terminal:
|
|
26
|
+
ip address
|
|
27
|
+
|
|
28
|
+
Identify the active network interface. The manual uses enp0s3.
|
|
29
|
+
|
|
30
|
+
Step 3: Start packet capture using tcpdump
|
|
31
|
+
sudo tcpdump -i enp0s3 -s 0 -w httpdump.pcap
|
|
32
|
+
|
|
33
|
+
Enter the password when prompted.
|
|
34
|
+
|
|
35
|
+
Explanation:
|
|
36
|
+
- tcpdump captures network packets.
|
|
37
|
+
- -i enp0s3 selects the network interface.
|
|
38
|
+
- -s 0 captures complete packets.
|
|
39
|
+
- -w httpdump.pcap saves the capture into a file.
|
|
40
|
+
Step 4: Generate HTTP traffic
|
|
41
|
+
1. Open the browser inside the VM.
|
|
42
|
+
2. Visit:
|
|
43
|
+
http://www.altoromutual.com/login.jsp
|
|
44
|
+
|
|
45
|
+
3. Enter the lab credentials specified in the manual:
|
|
46
|
+
Username: Admin
|
|
47
|
+
Password: Admin
|
|
48
|
+
|
|
49
|
+
4. Click Login.
|
|
50
|
+
5. Close the browser.
|
|
51
|
+
Step 5: Stop the packet capture
|
|
52
|
+
|
|
53
|
+
Return to Terminal and press:
|
|
54
|
+
Ctrl + C
|
|
55
|
+
|
|
56
|
+
Step 6: Examine the captured HTTP traffic
|
|
57
|
+
1. Open the home directory.
|
|
58
|
+
2. Open httpdump.pcap using Wireshark.
|
|
59
|
+
3. Apply this filter:
|
|
60
|
+
http
|
|
61
|
+
|
|
62
|
+
4. Locate a POST request.
|
|
63
|
+
5. Expand:
|
|
64
|
+
HTML Form URL Encoded: application/x-www-form-urlencoded
|
|
65
|
+
You can observe the HTTP form data in the captured traffic.
|
|
66
|
+
|
|
67
|
+
Part 2: Capture and view HTTPS traffic
|
|
68
|
+
|
|
69
|
+
Step 7: Start another packet capture
|
|
70
|
+
sudo tcpdump -i enp0s3 -s 0 -w httpsdump.pcap
|
|
71
|
+
|
|
72
|
+
Step 8: Generate HTTPS traffic
|
|
73
|
+
1. Open the browser.
|
|
74
|
+
2. Visit:
|
|
75
|
+
https://www.netacad.com
|
|
76
|
+
|
|
77
|
+
3. Click Login.
|
|
78
|
+
4. Close the browser.
|
|
79
|
+
Step 9: Stop the capture
|
|
80
|
+
|
|
81
|
+
Press Ctrl + C in Terminal.
|
|
82
|
+
|
|
83
|
+
Step 10: Examine HTTPS traffic
|
|
84
|
+
1. Open httpsdump.pcap in Wireshark.
|
|
85
|
+
2. Apply this filter:
|
|
86
|
+
tcp.port==443
|
|
87
|
+
|
|
88
|
+
3. Select a relevant packet.
|
|
89
|
+
4. Expand the Encrypted Application Data section.
|
|
90
|
+
Expected observation:
|
|
91
|
+
- HTTP traffic can expose readable application data.
|
|
92
|
+
- HTTPS encrypts application data, making its contents unreadable in an ordinary packet capture.
|
|
93
|
+
|
|
94
|
+
---------------------------------------------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
B. Exploring Processes, Threads, Handles and Windows Registry
|
|
97
|
+
Part 1: Exploring processes
|
|
98
|
+
|
|
99
|
+
Step 1: Download Windows Sysinternals Suite
|
|
100
|
+
|
|
101
|
+
Download it from the Microsoft Sysinternals website.
|
|
102
|
+
|
|
103
|
+
Extract the downloaded files.
|
|
104
|
+
|
|
105
|
+
Step 2: Open Process Explorer
|
|
106
|
+
1. Open the extracted SysinternalsSuite folder.
|
|
107
|
+
2. Run:
|
|
108
|
+
procexp.exe
|
|
109
|
+
|
|
110
|
+
3. Accept the license agreement.
|
|
111
|
+
4. Process Explorer displays currently running processes.
|
|
112
|
+
Step 3: Identify an active process
|
|
113
|
+
1. Open a web browser.
|
|
114
|
+
2. In Process Explorer, use the Find Window's Process icon.
|
|
115
|
+
3. Drag the icon onto the browser window.
|
|
116
|
+
4. Observe the highlighted browser process.
|
|
117
|
+
You can right-click the selected process and choose Kill Process in the lab exercise.
|
|
118
|
+
|
|
119
|
+
Step 4: Explore another process
|
|
120
|
+
1. Open Command Prompt.
|
|
121
|
+
2. Use the Find Window's Process icon on the Command Prompt window.
|
|
122
|
+
3. Observe the highlighted process.
|
|
123
|
+
The manual identifies:
|
|
124
|
+
Process Meaning
|
|
125
|
+
cmd.exe Command Prompt process
|
|
126
|
+
explorer.exe Parent process
|
|
127
|
+
conhost.exe Child process
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
Run a ping command in Command Prompt and observe the process activity.
|
|
131
|
+
|
|
132
|
+
Part 2: Exploring threads and handles
|
|
133
|
+
|
|
134
|
+
Step 5: Examine threads
|
|
135
|
+
1. In Process Explorer, right-click conhost.exe.
|
|
136
|
+
2. Select Properties.
|
|
137
|
+
3. Open the Threads tab.
|
|
138
|
+
4. Examine the active threads.
|
|
139
|
+
Step 6: Examine handles
|
|
140
|
+
1. In Process Explorer, select View.
|
|
141
|
+
2. Select Lower Pane View.
|
|
142
|
+
3. Choose Handles.
|
|
143
|
+
4. Examine the handles associated with conhost.exe.
|
|
144
|
+
Part 3: Exploring Windows Registry
|
|
145
|
+
|
|
146
|
+
Step 7: Open Registry Editor
|
|
147
|
+
|
|
148
|
+
Press Start and search for:
|
|
149
|
+
regedit
|
|
150
|
+
|
|
151
|
+
Open Registry Editor and allow permission if prompted.
|
|
152
|
+
|
|
153
|
+
Step 8: Understand the five registry hives
|
|
154
|
+
Registry hive Purpose
|
|
155
|
+
HKEY_CLASSES_ROOT File associations and application classes
|
|
156
|
+
HKEY_CURRENT_USER Current user's settings
|
|
157
|
+
HKEY_LOCAL_MACHINE Local computer configuration
|
|
158
|
+
HKEY_USERS Settings of all users
|
|
159
|
+
HKEY_CURRENT_CONFIG Current hardware configuration
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
Step 9: Locate EulaAccepted
|
|
163
|
+
|
|
164
|
+
Navigate to:
|
|
165
|
+
HKEY_CURRENT_USER
|
|
166
|
+
\Software
|
|
167
|
+
\Sysinternals
|
|
168
|
+
\Process Explorer
|
|
169
|
+
|
|
170
|
+
Find the EulaAccepted registry value.
|
|
171
|
+
|
|
172
|
+
Step 10: Modify the registry value
|
|
173
|
+
1. Double-click EulaAccepted.
|
|
174
|
+
2. Observe its current value, which is 1.
|
|
175
|
+
3. Change the value to 0.
|
|
176
|
+
4. Click OK.
|
|
177
|
+
5. Open Process Explorer again and observe the license agreement behavior.
|
|
178
|
+
Result: Successfully examined HTTP/HTTPS traffic, Windows processes, threads, handles and registry settings.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Aim: To perform encryption, decryption and hashing of files using ZIP tools and OpenSSL.
|
|
2
|
+
|
|
3
|
+
Requirements:
|
|
4
|
+
- CyberOps Workstation VM
|
|
5
|
+
- Linux Terminal
|
|
6
|
+
- ZIP utility
|
|
7
|
+
- fcrackzip
|
|
8
|
+
- OpenSSL
|
|
9
|
+
A. Encrypting and decrypting data using a ZIP tool
|
|
10
|
+
|
|
11
|
+
Step 1: Create a directory
|
|
12
|
+
mkdir first
|
|
13
|
+
cd first
|
|
14
|
+
|
|
15
|
+
- mkdir creates a directory.
|
|
16
|
+
- cd enters the directory.
|
|
17
|
+
|
|
18
|
+
Step 2: Create three sample files
|
|
19
|
+
echo "This is my first practical 1" > sample1.txt
|
|
20
|
+
echo "This is my first practical 2" > sample2.txt
|
|
21
|
+
echo "This is my first practical 3" > sample3.txt
|
|
22
|
+
|
|
23
|
+
The echo command writes text into files. The > symbol creates a file or overwrites its contents.
|
|
24
|
+
|
|
25
|
+
Step 3: Encrypt the files
|
|
26
|
+
zip -e file1.zip sample1.txt sample2.txt sample3.txt
|
|
27
|
+
|
|
28
|
+
Enter password:
|
|
29
|
+
g
|
|
30
|
+
|
|
31
|
+
Create another ZIP file:
|
|
32
|
+
zip -e file2.zip sample1.txt sample2.txt sample3.txt
|
|
33
|
+
|
|
34
|
+
Enter password:
|
|
35
|
+
w1
|
|
36
|
+
|
|
37
|
+
Step 4: Decrypt the ZIP file
|
|
38
|
+
unzip file1.zip
|
|
39
|
+
|
|
40
|
+
Enter password g when prompted.
|
|
41
|
+
|
|
42
|
+
Step 5: Crack the ZIP passwords using fcrackzip
|
|
43
|
+
|
|
44
|
+
First, view the help menu:
|
|
45
|
+
fcrackzip --help
|
|
46
|
+
|
|
47
|
+
Try cracking the first ZIP:
|
|
48
|
+
fcrackzip -vul 1-2 file1.zip
|
|
49
|
+
|
|
50
|
+
Try cracking the second ZIP:
|
|
51
|
+
fcrackzip -vul 1-2 file2.zip
|
|
52
|
+
|
|
53
|
+
Command explanation:
|
|
54
|
+
Option Meaning
|
|
55
|
+
-v Verbose mode
|
|
56
|
+
-u Test password by attempting to unzip
|
|
57
|
+
-l 1-2 Password length between 1 and 2 characters
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
Expected result:
|
|
61
|
+
- file1.zip → Password g
|
|
62
|
+
- file2.zip → Password w1
|
|
63
|
+
Use password-cracking tools only on your own lab files.
|
|
64
|
+
|
|
65
|
+
-------------------------------------------------------------------------------------------
|
|
66
|
+
|
|
67
|
+
B. Encrypting and decrypting data using OpenSSL
|
|
68
|
+
Step 1: Create a text file
|
|
69
|
+
echo "hello world" > text1.txt
|
|
70
|
+
|
|
71
|
+
Step 2: Encrypt the file
|
|
72
|
+
openssl aes-256-cbc -a -in text1.txt -out text2.txt
|
|
73
|
+
|
|
74
|
+
Enter and confirm a password.
|
|
75
|
+
|
|
76
|
+
Step 3: View encrypted content
|
|
77
|
+
cat text2.txt
|
|
78
|
+
|
|
79
|
+
You will see unreadable encrypted text.
|
|
80
|
+
|
|
81
|
+
Step 4: Decrypt the file
|
|
82
|
+
openssl aes-256-cbc -a -d -in text2.txt -out text3.txt
|
|
83
|
+
|
|
84
|
+
Enter the same password.
|
|
85
|
+
|
|
86
|
+
Step 5: View decrypted content
|
|
87
|
+
cat text3.txt
|
|
88
|
+
|
|
89
|
+
Expected output:
|
|
90
|
+
hello world
|
|
91
|
+
|
|
92
|
+
Step 6: Create and encrypt a custom file
|
|
93
|
+
nano letter_to_grandma.txt
|
|
94
|
+
|
|
95
|
+
Enter some text, then save using Ctrl + O, Enter and Ctrl + X.
|
|
96
|
+
|
|
97
|
+
Encrypt it:
|
|
98
|
+
openssl aes-256-cbc -a -in letter_to_grandma.txt -out msg.enc
|
|
99
|
+
|
|
100
|
+
Step 7: Decrypt the custom file
|
|
101
|
+
openssl aes-256-cbc -a -d -in msg.enc -out text4.txt
|
|
102
|
+
|
|
103
|
+
View the decrypted content:
|
|
104
|
+
cat text4.txt
|
|
105
|
+
|
|
106
|
+
Expected result: The contents of the original and decrypted files should match.
|
|
107
|
+
|
|
108
|
+
--------------------------------------------------------------------------------------------------
|
|
109
|
+
|
|
110
|
+
C. Hashing files using OpenSSL
|
|
111
|
+
Step 1: Create a text file
|
|
112
|
+
nano letter_to_grandma.txt
|
|
113
|
+
|
|
114
|
+
Enter some text and save it.
|
|
115
|
+
|
|
116
|
+
Step 2: Generate SHA-256 hash
|
|
117
|
+
openssl sha256 letter_to_grandma.txt
|
|
118
|
+
|
|
119
|
+
Step 3: Generate SHA-512 hash
|
|
120
|
+
openssl sha512 letter_to_grandma.txt
|
|
121
|
+
|
|
122
|
+
Copy both hash values.
|
|
123
|
+
|
|
124
|
+
Step 4: Modify the original file
|
|
125
|
+
nano letter_to_grandma.txt
|
|
126
|
+
|
|
127
|
+
Change a word, for example, change delicious to amazing.
|
|
128
|
+
|
|
129
|
+
Save the file.
|
|
130
|
+
|
|
131
|
+
Step 5: Generate hashes again
|
|
132
|
+
openssl sha256 letter_to_grandma.txt
|
|
133
|
+
openssl sha512 letter_to_grandma.txt
|
|
134
|
+
|
|
135
|
+
Step 6: Compare the hashes
|
|
136
|
+
|
|
137
|
+
The new hash values will be different from the original values because the file content has changed.
|
|
138
|
+
|
|
139
|
+
Result: Successfully performed ZIP encryption, OpenSSL encryption/decryption and SHA-256/SHA-512 hashing.
|
soc_practicals/notes/Practical 10 /321/202/320/220/320/243 Install and Configure Graylog on Linux"
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
Aim: To install and configure Graylog on Linux for centralized log management, monitoring and analysis.
|
|
2
|
+
|
|
3
|
+
Requirements:
|
|
4
|
+
- Ubuntu Linux
|
|
5
|
+
- Internet connection
|
|
6
|
+
- Terminal
|
|
7
|
+
- Java
|
|
8
|
+
- MongoDB
|
|
9
|
+
- Elasticsearch
|
|
10
|
+
- Graylog Server
|
|
11
|
+
Step 1: Install prerequisites
|
|
12
|
+
Update the package repository:
|
|
13
|
+
sudo apt-get update
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
Install the required packages:
|
|
17
|
+
sudo apt-get install apt-transport-https openjdk-11-jre-headless uuid-runtime pwgen
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
These packages provide Java and utilities required by Graylog.
|
|
21
|
+
Step 2: Install MongoDB
|
|
22
|
+
sudo apt-get install mongodb-server
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
MongoDB is used by Graylog to store configuration and metadata.
|
|
26
|
+
Step 3: Install Elasticsearch
|
|
27
|
+
Add the Elasticsearch GPG key:
|
|
28
|
+
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
Add the repository:
|
|
32
|
+
echo "deb https://artifacts.elastic.co/packages/oss-7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
Update packages:
|
|
36
|
+
sudo apt-get update
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
Install Elasticsearch:
|
|
40
|
+
sudo apt-get install elasticsearch-oss
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Step 4: Configure Elasticsearch
|
|
44
|
+
Open its configuration file:
|
|
45
|
+
sudo nano /etc/elasticsearch/elasticsearch.yml
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
Add the following settings:
|
|
49
|
+
cluster.name: graylog
|
|
50
|
+
action.auto_create_index: false
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
Save the file.
|
|
54
|
+
Step 5: Start Elasticsearch
|
|
55
|
+
Reload systemd:
|
|
56
|
+
sudo systemctl daemon-reload
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Enable Elasticsearch:
|
|
60
|
+
sudo systemctl enable elasticsearch
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
Start Elasticsearch:
|
|
64
|
+
sudo systemctl start elasticsearch
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Step 6: Install Graylog
|
|
68
|
+
Download the Graylog repository package:
|
|
69
|
+
wget https://packages.graylog2.org/repo/packages/graylog-4.3-repository_latest.deb
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
Install the repository:
|
|
73
|
+
sudo dpkg -i graylog-4.3-repository_latest.deb
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
Update the package list:
|
|
77
|
+
sudo apt-get update
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Install Graylog Server:
|
|
81
|
+
sudo apt-get install graylog-server
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
Step 7: Generate Graylog password secret
|
|
85
|
+
Execute:
|
|
86
|
+
pwgen -N 1 -s 96
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
This generates a secure random password secret.
|
|
90
|
+
|
|
91
|
+
Copy the generated value.
|
|
92
|
+
|
|
93
|
+
Generate the administrator password hash:
|
|
94
|
+
echo -n "your_password" | sha256sum | cut -d" " -f1
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
Replace your_password with your desired administrator password.
|
|
98
|
+
|
|
99
|
+
Copy the generated hash.
|
|
100
|
+
Step 8: Configure Graylog
|
|
101
|
+
Open the configuration file:
|
|
102
|
+
sudo nano /etc/graylog/server/server.conf
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
Add or modify the following settings:
|
|
106
|
+
password_secret = YOUR_GENERATED_SECRET
|
|
107
|
+
root_password_sha2 = YOUR_GENERATED_HASH
|
|
108
|
+
http_bind_address = 0.0.0.0:9000
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
Replace the placeholders with your actual generated values.
|
|
112
|
+
|
|
113
|
+
Save the file.
|
|
114
|
+
Step 9: Start Graylog Server
|
|
115
|
+
Reload systemd:
|
|
116
|
+
sudo systemctl daemon-reload
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
Enable Graylog:
|
|
120
|
+
sudo systemctl enable graylog-server
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
Start Graylog:
|
|
124
|
+
sudo systemctl start graylog-server
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
Step 10: Check service status
|
|
128
|
+
Check Elasticsearch:
|
|
129
|
+
sudo systemctl status elasticsearch
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
Check MongoDB:
|
|
133
|
+
sudo systemctl status mongodb
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
Check Graylog:
|
|
137
|
+
sudo systemctl status graylog-server
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
Expected result: The services should be running successfully.
|
|
141
|
+
Step 11: Configure the firewall
|
|
142
|
+
If UFW is enabled, allow the required ports:
|
|
143
|
+
sudo ufw allow 9000/tcp
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
sudo ufw allow 12201/udp
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
sudo ufw allow 12201/tcp
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
Port explanation:
|
|
153
|
+
Port Purpose
|
|
154
|
+
9000 Graylog web interface
|
|
155
|
+
12201 UDP GELF UDP
|
|
156
|
+
12201 TCP GELF TCP
|
|
157
|
+
|
|
158
|
+
Step 12: Access Graylog
|
|
159
|
+
Open a browser and visit:
|
|
160
|
+
http://YOUR_SERVER_IP:9000
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
Login:
|
|
164
|
+
Username: admin
|
|
165
|
+
Password: Your configured password
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
Expected result: Graylog web interface opens successfully.
|
|
169
|
+
Additional configuration (as given in the manual)
|
|
170
|
+
Increase Elasticsearch memory limits
|
|
171
|
+
sudo nano /etc/elasticsearch/jvm.options
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
Modify:
|
|
175
|
+
-Xms2g
|
|
176
|
+
-Xmx2g
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
Configure system limits
|
|
180
|
+
sudo nano /etc/security/limits.conf
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Add:
|
|
184
|
+
elasticsearch soft nofile 65536
|
|
185
|
+
elasticsearch hard nofile 65536
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
View Graylog logs
|
|
189
|
+
sudo tail -f /var/log/graylog-server/server.log
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
Result: Successfully installed and configured Graylog Server and accessed its web interface for centralized log management.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Aim: To examine Telnet and SSH traffic, investigate Windows host attacks and analyze malware using Wireshark, Sguil and Kibana.
|
|
2
|
+
|
|
3
|
+
Requirements:
|
|
4
|
+
- CyberOps Workstation VM
|
|
5
|
+
- Security Onion VM
|
|
6
|
+
- Wireshark
|
|
7
|
+
- Sguil
|
|
8
|
+
- Kibana
|
|
9
|
+
- Terminal
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
A. Examining Telnet and SSH in Wireshark
|
|
13
|
+
Step 1: Start the virtual machine
|
|
14
|
+
1. Start CyberOps Workstation VM.
|
|
15
|
+
2. Login using:
|
|
16
|
+
Username: analyst
|
|
17
|
+
Password: cyberops
|
|
18
|
+
|
|
19
|
+
3. Open Wireshark.
|
|
20
|
+
4. Select the Loopback (lo) interface.
|
|
21
|
+
5. Start packet capture.
|
|
22
|
+
Step 2: Start a Telnet connection
|
|
23
|
+
|
|
24
|
+
Open another terminal:
|
|
25
|
+
telnet localhost
|
|
26
|
+
|
|
27
|
+
Enter the lab username and password when prompted.
|
|
28
|
+
|
|
29
|
+
Stop the Wireshark capture after login.
|
|
30
|
+
|
|
31
|
+
Step 3: Examine Telnet traffic
|
|
32
|
+
|
|
33
|
+
1. Enter this filter in Wireshark:
|
|
34
|
+
telnet
|
|
35
|
+
|
|
36
|
+
2. Right-click a Telnet packet.
|
|
37
|
+
3. Select Follow → TCP Stream.
|
|
38
|
+
4. Observe the communication.
|
|
39
|
+
You can see the username and password in readable plaintext.
|
|
40
|
+
|
|
41
|
+
Step 4: Start an SSH connection
|
|
42
|
+
|
|
43
|
+
Start another Wireshark capture.
|
|
44
|
+
|
|
45
|
+
Open the terminal:
|
|
46
|
+
ssh localhost
|
|
47
|
+
|
|
48
|
+
Enter yes if asked to continue connecting, then enter the lab password.
|
|
49
|
+
|
|
50
|
+
Stop the capture.
|
|
51
|
+
|
|
52
|
+
Step 5: Examine SSH traffic
|
|
53
|
+
|
|
54
|
+
1. Apply the filter:
|
|
55
|
+
ssh
|
|
56
|
+
|
|
57
|
+
2. Right-click an SSHv2 packet.
|
|
58
|
+
3. Select Follow → TCP Stream.
|
|
59
|
+
4. Observe the captured data.
|
|
60
|
+
Unlike Telnet, SSH communication is encrypted and unreadable in the packet stream.
|
|
61
|
+
|
|
62
|
+
Result: Telnet displays readable credentials, whereas SSH protects communication through encryption.
|
|
63
|
+
|
|
64
|
+
--------------------------------------------------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
B. Investigating an attack on a Windows host
|
|
67
|
+
This section uses Security Onion, Sguil and Kibana to investigate previously captured security alerts.
|
|
68
|
+
|
|
69
|
+
Step 1: Open Sguil
|
|
70
|
+
1. Start the Security Onion VM.
|
|
71
|
+
2. Login using:
|
|
72
|
+
Username: analyst
|
|
73
|
+
Password: cyberops
|
|
74
|
+
|
|
75
|
+
3. Open Sguil.
|
|
76
|
+
4. Login using the same lab credentials.
|
|
77
|
+
5. Click Select All → Start.
|
|
78
|
+
6. Locate the alerts dated 19 March 2019.
|
|
79
|
+
Step 2: Investigate the alerts
|
|
80
|
+
1. Select Alert ID 5.439.
|
|
81
|
+
2. Enable:
|
|
82
|
+
- Show Packet Data
|
|
83
|
+
- Show Rule
|
|
84
|
+
3. Examine the packet headers and IDS rule.
|
|
85
|
+
4. Select Alert ID 5.440.
|
|
86
|
+
5. Right-click and select Transcript.
|
|
87
|
+
A transcript displays the communication associated with the alert.
|
|
88
|
+
|
|
89
|
+
Step 3: Export the suspicious executable
|
|
90
|
+
1. Open the alert transcript.
|
|
91
|
+
2. Close the transcript.
|
|
92
|
+
3. In Wireshark, select:
|
|
93
|
+
File → Export Objects → HTTP
|
|
94
|
+
4. Save the executable file to the analyst's home directory.
|
|
95
|
+
5. Generate its SHA-256 hash.
|
|
96
|
+
sha256sum filename
|
|
97
|
+
|
|
98
|
+
6. Copy the hash and examine it using the Cisco Talos File Reputation website mentioned in the manual.
|
|
99
|
+
|
|
100
|
+
Step 4: Investigate Remcos RAT
|
|
101
|
+
1. Return to Sguil.
|
|
102
|
+
2. Locate Alert ID 5.480.
|
|
103
|
+
3. Identify the event message Remcos RAT Checkin.
|
|
104
|
+
4. Open its transcript.
|
|
105
|
+
5. Examine the remaining related alerts and downloaded executable files.
|
|
106
|
+
Step 5: Investigate using Kibana
|
|
107
|
+
1. Close Sguil.
|
|
108
|
+
2. Open Kibana.
|
|
109
|
+
3. Login using the lab credentials.
|
|
110
|
+
4. Select Last 24 Hours.
|
|
111
|
+
5. Change the Absolute time range to:
|
|
112
|
+
March 1, 2019 – March 31, 2019
|
|
113
|
+
|
|
114
|
+
6. Locate the event on March 19.
|
|
115
|
+
7. Click the event to narrow the time range.
|
|
116
|
+
Step 6: Examine network logs
|
|
117
|
+
1. Open the All Sensors – Log Type section.
|
|
118
|
+
2. Examine the available log types.
|
|
119
|
+
3. Locate the NIDS Alert Summary.
|
|
120
|
+
4. Filter the alert related to the Dridex malicious SSL certificate.
|
|
121
|
+
5. Examine the source IP address 31.22.4.176.
|
|
122
|
+
6. Open All Logs and expand the relevant log.
|
|
123
|
+
Step 7: Explore Zeek dashboards
|
|
124
|
+
1. Open the HTTP dashboard under Zeek Hunting.
|
|
125
|
+
2. Examine HTTP URIs and HTTP Sites.
|
|
126
|
+
3. Open the DNS dashboard.
|
|
127
|
+
4. Examine DNS Queries.
|
|
128
|
+
Result: Successfully investigated Windows host security alerts and examined network traffic and suspicious
|
|
129
|
+
malware activity using Sguil and Kibana.
|
|
130
|
+
|
|
131
|
+
------------------------------------------------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
C. Investigating a malware exploit
|
|
134
|
+
Step 1: Open Kibana
|
|
135
|
+
1. Start Security Onion.
|
|
136
|
+
2. Login using the lab credentials.
|
|
137
|
+
3. Open Kibana.
|
|
138
|
+
4. Set the Absolute time range to January 2017.
|
|
139
|
+
Step 2: Locate the attack
|
|
140
|
+
1. Open the NIDS Alert Data dashboard.
|
|
141
|
+
2. Locate the NIDS Alerts Over Time graph.
|
|
142
|
+
3. Zoom into the attack event by selecting the graph area.
|
|
143
|
+
4. Click the first event.
|
|
144
|
+
5. Scroll down and expand the first NIDS alert.
|
|
145
|
+
Step 3: Examine the event transcript
|
|
146
|
+
1. Open the alert's _id value.
|
|
147
|
+
2. Pivot to CapME.
|
|
148
|
+
3. Examine the transcript.
|
|
149
|
+
4. Open the HTTP dashboard and examine HTTP Sites.
|
|
150
|
+
Step 4: Investigate using Sguil
|
|
151
|
+
1. Open Sguil.
|
|
152
|
+
2. Enable all sensors and click Start.
|
|
153
|
+
3. Locate the alerts from January 27, 2017.
|
|
154
|
+
4. Enable Show Packet Data and Show Rule.
|
|
155
|
+
5. Examine Alert IDs 5.2, 5.24 and 5.25.
|
|
156
|
+
6. Right-click the relevant alerts and open their transcripts.
|
|
157
|
+
Step 5: Investigate using Wireshark
|
|
158
|
+
1. Right-click Alert ID 5.2.
|
|
159
|
+
2. Pivot to Wireshark.
|
|
160
|
+
3. Change the time display using:
|
|
161
|
+
View → Time Display Format → Date and Time of Day
|
|
162
|
+
4. Apply the HTTP request filter:
|
|
163
|
+
http.request
|
|
164
|
+
|
|
165
|
+
5. Examine the HTTP packets.
|
|
166
|
+
6. Select File → Export Objects → HTTP.
|
|
167
|
+
7. Save the required captured files for analysis.
|
|
168
|
+
Step 6: Generate file hashes
|
|
169
|
+
|
|
170
|
+
Use:
|
|
171
|
+
sha1sum filename
|
|
172
|
+
|
|
173
|
+
Compare the SHA-1 hash with the hash generated through NetworkMiner.
|
|
174
|
+
|
|
175
|
+
The manual also asks you to examine the hash and URL using VirusTotal.
|
|
176
|
+
|
|
177
|
+
Step 7: Examine exploit artifacts
|
|
178
|
+
|
|
179
|
+
Open the exported files using a text editor and inspect:
|
|
180
|
+
- remodeling-your-kitchen-cabinets.html
|
|
181
|
+
- dle_js.js
|
|
182
|
+
- The exported HTML file
|
|
183
|
+
Result: Successfully investigated malware exploit traffic, security alerts, HTTP objects and suspicious file hashes.
|