You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,34 @@ We were on an Internal pen test where the client had unauthenticated access to a
9
9
10
10
Also Bastion on Hack The Box is a thing.
11
11
12
+
#### No, why isn't this a PR to foremost or binwalk?
13
+
...good question
14
+
12
15
## Notes
13
16
If the haystack is a true backup of a Windows computer, it is very likely there will be multiple copies of the registry hive on disk due to Windows keeping a copy for recovery purposes. If local or LSA secrets is output multiple times with the same data, this is likely the reasoning.
print("Potentially found SECURITY at offset {} within searched chunk {}. Writing to {}".format(temp_SECURITY, chunk_num, tmp_name))
151
165
withopen(tmp_name, "wb") asSECURITY:
@@ -183,7 +197,7 @@ def check(no_auto_dump):
183
197
autodump(found[0], found[1], found[2], found[3])
184
198
185
199
186
-
defmain(f, f_size, clean, no_auto_dump):
200
+
defmain(f, f_size, clean, no_auto_dump, output):
187
201
# reading in chunks and scanning through the chunks, if we don't find anything, maybe our chunks were too small and the pattern was at the boundry of chunks so we need to seek by chunk / 2 and scan again
parser.add_argument('--clean', action='store_true', default=False, help="Clean dirty on disk registry keys in a very hacky way that somehow works (usually needed for vhd)")
234
-
parser.add_argument('--no-auto-dump', action='store_true', default=False, help="Try to automatically use secretsdump if SAM and SYSTEM or SYSTEM and SECURITY are found")
247
+
parser.add_argument('-c','--clean', action='store_true', default=False, help="Clean dirty on disk registry keys in a very hacky way that somehow works (usually needed for vhd)")
248
+
parser.add_argument('-n','--no-auto-dump', action='store_true', default=False, help="Try to automatically use secretsdump if SAM and SYSTEM or SYSTEM and SECURITY are found")
249
+
parser.add_argument('-o','--output', dest="output", default=None, required=False, help='Output Directory for registry hives, default: current directory')
235
250
parser.add_argument('haystack', metavar='haystack', type=str, nargs='*', help='Haystack to parse')
0 commit comments