-
Notifications
You must be signed in to change notification settings - Fork 32
/
HISTORY.txt
356 lines (314 loc) · 15.7 KB
/
HISTORY.txt
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
The Offline NT Password Editor
(c) 1997-2014 Petter Nordahl-Hagen
See README for general info, copyright & credits.
See INSTALL for compile/installation instructions.
Revision history
(tools only, see website for info on bootdisk revisions)
* v 1.00 140201 (beta releases to some people dated 1308xx)
samlib:
new library, contains functions for user and group
manipulation and low level SID functions. Main features:
- add user to local group
- remove user from local group
- reset user password
- list users and groups, with memberships etc
- SID handling routines (binary to/from string etc) required by
group/user edit functions
- updates both group and user correctly, thus finally user "promotion" works!
regedit library:
- Enter buil-in buffer debugger only if in trace mode, else return error or abort()
- Fixed critical bug in del_value which could
thrash the hive when removing value in bottom of key.
- And a pointer not reinitialized when buffer reallocated in some cases, fixed.
Thanks to Jacky To for reporting those two.
- Some minor adjustments for compiler. A few more utility functions.
sampasswd:
new command line utility
- Can be used to reset users passwords from scripts (non interactive)
- Also a few list options, also can supply parsable output
samusrgrp:
new command line utility
- edit group memberships (non interactive)
- some list functions, parsable
chntpw:
- Now dedicated to interactive edits
- Now supports full local group membership edits, finally working promotion!
- A lot of users complained about user select being difficult to exit
(not understanding to use ! to quit), so after user edit, return
is to main menu or program exit (if not -i option)
- User edit (reset, promote etc) now loops instead until q for quit
* v 0.99.6 110511
regedit library (chntpw and reged uses it):
- Hive expansion! Library now does hive file expansion by
default! (but you can turn it off, safe mode). If expansion occured, you
will get a warning when saving the hive.
- There were a lot of goofs by me in the add/delete key and value
handling, which made windows complain and lose data. Hope I managed
to fix them.
- Also, found out more about how Windows does things, for example:
- Empty name (default) value, flag field is 0 (not 1 as usual)
- Values with data size 0 to 4 the value data itself is stored in
the data pointer field, typical for DWORD (this I knew a long time
ago), sign bit of data size field is then set. BUT..
- In a lot of cases in SAM, for null name values, size is 0 with sign
set. In that case, the data dword is stored in the TYPE field,
and the rest is unused. This saves a few bytes of course.. but why?
The rest of the stuff registry is used for is often seriously bloated
anyway. Did the guys at MS who actually wrote the SAM stuff back
in the NT3 days actually do it because they cared? or just because
they found something new and exiting they smoked? :)
- Large values (seems to be from around 16k) are split internally in
several parts. Sounds smart. But it goes via 2 (two) separate data
structures that has to be allocated.
For regular small values the data pointer simply points to the data
itself. For this split large value it points to a "db" struct. This
contais a count of how many parts there are. And then the list of
pointers to the data parts? Nope. It points to another area where
the list of pointers are stored.
Pseudo: vk.ofs_data -> db.list -> list[n] -> raw data block n
The last raw data block always allocates the whole hbin (usually
16k) it is in, even if all of it is not needed. Of course only the correct
amount of data is copied out based on the value length.
On new Vista64 bit SP2, this happens at least 2 times in
SOFTWARE\Microsoft tree.
reged:
- On popular demand: .reg file import!! (-I)
- Will read files from regedit.exe in most cases
(UTF-16) but can miss on some international characters. Also reads
"latin" (8 bit) files.
- Only one .reg and hive at a time supported.
- Did quite a lot of testing by importing for example the
SOFTWARE\Classes tree with regedit.exe and importing it again into
the DEFAULT hive with my tool, then ask windows to "Load hive" (in
regedit.exe). If it does not complain in the event log, it is good.
(Also, seems like windows has gotten better at not bluescreening on
a corrupt registry hive, did not get a single one when doing this
with pretty messed up hives in win7 and Vista)
- Be aware that .reg import is currently very slow, since I messed
up the design for the string reading badly, and also the add routines is
not exactly optimized. Consider it a proof of concept! Example:
Import of SOFTWARE\Microsoft tree (exported by regedit.exe) into the
small DEFAULT hive took more than 10 minutes on a pretty fast
machine. Especially hex data is slow (one byte at a time.. lazy me..)
- WARNING: .reg file import does not do much sanity checking of the
input .reg file. It will either crash during import or mess up
the registry if the .reg file is bad.
- WARNING2: Limitation: Be careful when importing keys that has large
number of subkeys (like several 1000) since it does not split up
into indirect indexes (lh) yet, and windows may not like it.
- -N and -E options for safe mode edit (no alloc and no expand hive)
- Importing (-I) and then into edit (-e) before save possible,
by specifying both options.
- -I and -C (-IC) will import and auto-save, use this in scripts.
chntpw:
- This version has no significant changes in the password (reset)
handling part of the tools.
TODO list:
- Windows like API. Faster .reg import. Fix bugs! Maybe not in that
order :)
* v 0.99.6 100627
chntpw:
- Syskey not visible in menu anymore, but is still selectable as # 2
This because too many people just went ahead without understanding
its purpose, and the emailed me when things went as expected, that
is it went *boom*
- Interactive menu adapts to show most relevant selections based
on what is loaded
reged:
- Patches from Frediano Ziglio adding or fixing:
buffer overflow in export_subkey printing keyname
some quoting error (name and string values must be quoted)
missing support for wide character encoding in keys and value names
regedit library (chntpw and reged uses it):
- New function from Aleksander Wojdyga: dpi, to decode product IDs
Can be used on for example \Microsoft\Windows NT\CurrentVersion\DigitalProductId
to find the systems product ID in cleartext.
Now as command in registry editor, but may be moved to chnpw menu later.
* v 0.99.6 080526
reged:
- NEW TOOL: It's actually just the interactive registry edit
(still also available in chntpw) plus
the registry export to .reg-file from command line.
This tool contains no password functions, thus no crypto.
chntpw:
- Interactive reg ed moved out of chntpw, into edlib.c
- 64 bit compatible patch by Mike Doty, via Alon Bar-Lev
http://bugs.gentoo.org/show_bug.cgi?id=185411
- Some minor tweaks and fixes
ntreg library:
- Type QWORD (XP/Vista and newer) now recognized
- Most functions accepting a path now also have a parameter specifying if
the search should be exact or on first match basis, thus
this libary version breaks build with older programs.
- Fixed bug which skipped first indirect index table when deleting keys,
usually leading to endless loop when recursive deleting.
- Export to .reg file by Leo von Klenze, expanded a bit by me.
- 64 bit compatible patch by Mike Doty, via Alon Bar-Lev
http://bugs.gentoo.org/show_bug.cgi?id=185411
- A few other small fixes and tweaks.
* v 0.99.5 070923
- User edit is now menu-driven, better visuals / tables / listings.
- Group memberships are listen on the user
- User promotion (put into admin group) is now public, with it's own
menu selection in the user menu. Still considered EXPERIMENTAL!
- Some other verbosity/visual changes
- Changed the verbosity (-v) option to be more useful for debug
or advanced information
* v 0.99.4 070406 (decade)
- 10 year anniversary!
- Changed to GPL license
- Support for Windows Vista was already there, but only blanking
password works.
- Some small insignificant changes, mainly to output or text.
* v 0.99.3 041205
- Fixed bug in loadhive(), caused a crash when last page pointer
was out of range, which seems to happen a lot on some
installations. Guess it is correct to just assume it is
end of file. Thanks to Michael Rothstein for supplying a
hive with this.
* v 0.99.3 040818
chntpw:
- Lot of nasty bugs fixed in REG_SZ and REG_MULTI_SZ input, often
trashed the heap, leading to later crashes.
- New regedit command "hex" to see value in hexdump regardles
of type.
- Some other minor fixes on hive load.
ntreg: Major bugfixes in key add/delete,
and support for more of the registry:
- Now full support of key add/del on NT351 ('li' index)
as a bi-effect this also adds support for NT4/win2k edits
in keys with indirect index (when it contains ~>500 subkeys)
since the index tables then switches from 'lf' (semi-hashed)
to 'li' (unhashed table).
- WinXP and newer uses 'lh' (true hash) always, even when going
via indirect tables ('ri'). I wasn't aware of this, so reading
or traversing that in earlier versions usually crashed.
- Critical bugs fixed in the allocation of space in the hive,
older versions may in several occations corrupt the hive.
- Fixed some hive load bugs, deallocate properly on close etc.
* v 0.99.2 040105
- Added RecoveryConsole parameter change
- Try to guess type of hive loaded (sam, system, security etc), this
is used by the user edit, syskey edit, RecoveryConsole edit
to look up into the right hive.
- Do not confirm save if the change-tracking option is set (-L)
(assume wrapper does it..)
- Hid the hash-stuff during password reset. I got all kinds of
confusing questions about it (most often: can I find the original
pw? Answer: NO if win2k or higher)
Option -v turns this on again for debugging.
- Also reduced some other debug output, -t and/or -v turns on again
most of it.
- Fixed some bugs:
- check of return value from open()
- corrected prototype defs for some calls into OpenSSL,
this fixes some compilation errors people have reported.
Thanks to Alexander Poquet for that.
- Probably _added_ more bugs :-} but they are yet unknown :)
* v 0.99.1 030126
- Fixed bug in ntreg, seems some files has garbage instead of zero
pages at end. Now stops enumerating on first non 'hbin' page.
Thanks to Jim Andersen for giving me a hive file that showed this.
- Reports strongly indicates that blanking a password
(* at the prompt) works more often than changing passwords.
Changed some wording regarding this.
* v 0.99.0 030112
- There is now full registry edit support with expansion of value
size and add / delete of keys and values!
See regedit.txt for more info on registry editing
See source for details on data block allocation etc in registry.
- Changed interactive mode (-i) a bit, now features menues.
- Syskeystatus/change not shown unless selected from menu.
- New option: -N to set it in old-edit mode, ie only exact
overwrites. This is for safety in testing etc.
* v 0.98.6 021213
- Added parsing of users F and SAMs F value, which stores account type bits
and lockout information. Ability to reset it if locked.
- As usual, see source (especially sam.h for details) on this.
* v 0.98.5 021208
- Added ability to enter RID (in hex) instead of username by
starting the entry with 0x. Works interactive and on commandline.
This will enable edit of users that has names which actually
use unicode, like some russian and asian systems.
- Only entering * for password will blank password by setting
hash lengths to zero. Seems to be working ok in 2k and XP.
This may also clear up an earlier failed change.
One bug/drawback: Seems to leak about 30-50 bytes in the V struct.
- Fixed bug in handling of blank LANMAN-pass.
* v 0.98.4 011022
- Fixed input buffer overflow that made it impossible to enter
usernames at 16 chars (the \n would flow over into the password
prompt thus not changing it)
- New option -L that will write the names of changed hives to
/tmp/changed. Mainly for use in my bootfloppy scripts.
* v 0.98.3 010808
- Blank password detection rewritten. The NT or LANMAN hash seems
to actually be missing from the sam entry if password is blank.
This will now be detected, and if only LANMAN is present, it
will be convertet to NT password.
- Some minor changes in text & prompts.
* v 0.98.2 010107
- Changed to use OpenSSL for MD4 & DES encryption instead of
the old libraries. Only change of build process from source
is to point the Makefile to wherever your OpenSSL libraries & includes are.
- Minor changes in wording of Syskey warnings.
- No functional changes.
- Known bugs: Hive statistics often wrong (but the numbers are not used
later, so it's not critical)
* v 0.98.1 000607
- Discovered that when a key has lots of subkeys (typically about
300 or more?) its hashtable is split and accessed through an
indirect ('ri') table, almost as some filesystems do with
datablock lists on large files. This caused an error "Not 'nk' node"
and sometimes a crash in earlier versions. In SAM this happens in
\SAM\Domains\Account\Users when the number of users are large
(which often is the case on domain controllers).
See source code for technical details on this. (WinReg.txt not updated)
* v 0.98 000401
- Disabling syskey on Win2000 corrupts the SAM somehow, makes it
unable to reenable + leaves it in a partial mode 1 syskey.
Also corrupts the Domain Trust password, making it impossible
to join og leave a domain.
Delete HKLM\SECURITY\Policy\Secrets\$MACHINE.ACC (the trust key,
may need to change ACLs to get to it) to leave the domain and make it
possible to rejoin.
- Added support for changing passwords without disabling or
changing syskey, simply by inserting old type password hash
into the sam. It gets converted to syskey-hash on next boot.
Why I didn't discover this before is beyond me.
- A few smaller bugfixes.
* v 0.98 000215
- Can now write, too, but only existing values, & same datalength.
- Internals rewritten, registry manipulation functions
now in separate "library".
- Added ability to check for and disable syskey. (see syskey.txt
& sourcecode for details)
- "Command line"-type registry-editor improved a bit.
- Possible to load and edit several hives at once
- Several minor changes.
- Since a lot has been rewritten, there's probably more bugs.
* v 0.90 990307
Major updates:
- Full registry parse/read/viever. Can follow the tree like a filesystem.
No write-support yet.
- 3.51 & 4.0 support. Seems to be working on NT5 betas, too.
- 100% sure to find usernames/passwords.
- Support for localized admin-names (will automatically find it)
- Several minor bugs from earlier versions fixed.
- Sorry, but still no syskey support. (but since full registry
read capabilities exsist, it's now easier to make it)
* PRE-1 970611
- Got reports on "Netlogon service not started"
(and then it was impossible to logon)
if attempt to change blank password into something else.
This was because if the password is set blank (from NT), the NT-logon
hash (md4) is not stored in SAM at all (the LANmanager hash seems to be
there..) However, chntpw didn't know about this, and happily(?) wrote away
and corrupted the SAM file, causing Netlogon to fail.
This version will flag accounts with blank passwords, and refuse to change it.
- The -i (interactive) option now loops. Will ask for a new name repeatedly,
until '!' is entered. This enables you to change multiple passwords in
one run.
- No support for syskey, yet.
* PRE-1 970528:
- First public release