Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.35 KB | None | 0 0
  1. Offline NT Password & Registry Editor, Walkthrough
  2.  
  3. 2014, NOTE: This is now a bit old, some are the same, some look a bit different..
  4.  
  5. The following is a walkthrough of using the CD to reset one user (admin) on a test Vista computer.
  6.  
  7. Insert the CD and convince your BIOS that it should boot from it. How to boot from a CD varies from computer make to computer make, so I cannot help you much. Some BIOS shows a boot device select menu if you press ESC, F8, F11 or F12 or something like that during the self test. (some even tell you on the screen what to press)
  8.  
  9. If it boots, you should see this:
  10.  
  11. ISOLINUX 3.51 2007-06-10 Copyright (C) 1994-2007 H. Peter Anvin
  12.  
  13.  
  14. ***************************************************************************
  15. * *
  16. * Windows NT/2k/XP/Vista Change Password / Registry Editor / Boot CD *
  17. * *
  18. * (c) 1998-2007 Petter Nordahl-Hagen. Distributed under GNU GPL v2 *
  19. * *
  20. * DISCLAIMER: THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTIES! *
  21. * THE AUTHOR CAN NOT BE HELD RESPONSIBLE FOR ANY DAMAGE *
  22. * CAUSED BY THE (MIS)USE OF THIS SOFTWARE *
  23. * *
  24. * More info at: http://pogostick.net/~pnh/ntpasswd/ *
  25. * Email : pnh@pogostick.net *
  26. * *
  27. * CD build date: Sun Sep 23 14:15:35 CEST 2007 *
  28. ***************************************************************************
  29.  
  30. Press enter to boot, or give linux kernel boot options first if needed.
  31. Some that I have to use once in a while:
  32. boot nousb - to turn off USB if not used and it causes problems
  33. boot irqpoll - if some drivers hang with irq problem messages
  34. boot nodrivers - skip automatic disk driver loading
  35.  
  36. boot:
  37. Usually just press enter here. If you have linux knowledge, you can tweak kernel options if you need/like.
  38.  
  39. Then it boots and outputs a lot of kernel messages about your hardware and such.. most if not all are nothing to worry about.
  40.  
  41.  
  42. Loading vmlinuz..................
  43. Loading scsi.cgz.........................
  44.  
  45. Loading initrd.cgz..........
  46. Ready.
  47. Linux version 2.6.22.6 (root@athene) (gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)) #2 Sun Sep 9 16:59:48 CEST 2007
  48. BIOS-provided physical RAM map:
  49. BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
  50. BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
  51. BIOS-e820: 00000000000ca000 - 00000000000cc000 (reserved)
  52. BIOS-e820: 00000000000dc000 - 0000000000100000 (reserved)
  53. BIOS-e820: 0000000000100000 - 00000000316f0000 (usable)
  54. BIOS-e820: 00000000316f0000 - 00000000316ff000 (ACPI data)
  55. BIOS-e820: 00000000316ff000 - 0000000031700000 (ACPI NVS)
  56. BIOS-e820: 0000000031700000 - 0000000031800000 (usable)
  57. BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
  58. BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
  59. BIOS-e820: 00000000fffe0000 - 0000000100000000 (reserved)
  60. 792MB LOWMEM available.
  61. Zone PFN ranges:
  62. DMA 0 -> 4096
  63. Normal 4096 -> 202752
  64. early_node_map[1] active PFN ranges
  65.  
  66. ...
  67.  
  68. Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
  69. serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
  70. Floppy drive(s): fd0 is 1.44M
  71. FDC 0 is a post-1991 82077
  72. RAMDISK driver initialized: 16 RAM disks of 32000K size 1024 blocksize
  73. USB Universal Host Controller Interface driver v3.0
  74. Initializing USB Mass Storage driver...
  75. usbcore: registered new interface driver usb-storage
  76. USB Mass Storage support registered.
  77. serio: i8042 KBD port at 0x60,0x64 irq 1
  78. serio: i8042 AUX port at 0x60,0x64 irq 12
  79. usbcore: registered new interface driver usbhid
  80. drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
  81. Using IPI Shortcut mode
  82. BIOS EDD facility v0.16 2004-Jun-25, 1 devices found
  83. Freeing unused kernel memory: 144k freed
  84. Booting ntpasswd
  85. Mounting: proc sys
  86. Ramdisk setup complete, stage separation..
  87. In stage 2
  88. Spawning shells on console 2 - 6
  89. Initialization complete!
  90.  
  91. ** Preparing driver modules to dir /lib/modules/2.6.22.6
  92. input: AT Translated Set 2 keyboard as /class/input/input0
  93.  
  94. Most of the generic linux boot now done, and we try to load the disk drivers. If you use the floppy version you will be asked to swap floppies at this point. Drivers are then tried based on PCI hardware indentification.
  95.  
  96. ** Will now try to auto-load relevant drivers based on PCI information
  97.  
  98. ---- AUTO DISK DRIVER select ----
  99. --- PROBE FOUND THE FOLLOWING DRIVERS:
  100. ata_piix
  101. ata_generic
  102. mptspi
  103. --- TRYING TO LOAD THE DRIVERS
  104. ### Loading ata_piix
  105. scsi0 : ata_piix
  106. scsi1 : ata_piix
  107. ata1: PATA max UDMA/33 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x00011050 irq 14
  108. ata2: PATA max UDMA/33 cmd 0x00010170 ctl 0x00010376 bmdma 0x00011058 irq 15
  109. ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33
  110. ata2.00: configured for UDMA/33
  111. scsi 1:0:0:0: CD-ROM NECVMWar VMware IDE CDR10 1.00 PQ: 0 ANSI: 5
  112. sr0: scsi3-mmc drive: 1x/1x xa/form2 cdda tray
  113. Uniform CD-ROM driver Revision: 3.20
  114.  
  115. ### Loading ata_generic
  116.  
  117. ### Loading mptspi
  118. Fusion MPT base driver 3.04.04
  119. Copyright (c) 1999-2007 LSI Logic Corporation
  120. Fusion MPT SPI Host driver 3.04.04
  121. PCI: Found IRQ 9 for device 0000:00:10.0
  122. mptbase: Initiating ioc0 bringup
  123. ioc0: 53C1030: Capabilities={Initiator}
  124. scsi2 : ioc0: LSI53C1030, FwRev=01032920h, Ports=1, MaxQ=128, IRQ=9
  125. scsi 2:0:0:0: Direct-Access VMware, VMware Virtual S 1.0 PQ: 0 ANSI: 2
  126. target2:0:0: Beginning Domain Validation
  127. target2:0:0: Domain Validation skipping write tests
  128. target2:0:0: Ending Domain Validation
  129. target2:0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25 ns, offset 127)
  130. sd 2:0:0:0: [sda] 83886080 512-byte hardware sectors (42950 MB)
  131. sd 2:0:0:0: [sda] Write Protect is off
  132. sd 2:0:0:0: [sda] Cache data unavailable
  133. sd 2:0:0:0: [sda] Assuming drive cache: write through
  134. sd 2:0:0:0: [sda] 83886080 512-byte hardware sectors (42950 MB)
  135. sd 2:0:0:0: [sda] Write Protect is off
  136. sd 2:0:0:0: [sda] Cache data unavailable
  137. sd 2:0:0:0: [sda] Assuming drive cache: write through
  138. sda: sda1
  139. sd 2:0:0:0: [sda] Attached SCSI disk
  140.  
  141. Most of these messages are from the drivers themselves. Some talk a lot, some doesn't. But all give info on the brand and model and size of the disks found, if any.
  142.  
  143.  
  144. -------------------------------------------------------------
  145. Driver load done, if none loaded, you may try manual instead.
  146. -------------------------------------------------------------
  147.  
  148.  
  149. ** If no disk show up, you may have to try again (d option) or manual (m).
  150.  
  151. You can later load more drivers..
  152.  
  153.  
  154. *************************************************************************
  155. * Windows Registry Edit Utility Floppy / chntpw *
  156. * (c) 1997 - 2007 Petter N Hagen - pnh@pogostick.net *
  157. * GNU GPL v2 license, see files on CD *
  158. * *
  159. * This utility will enable you to change or blank the password of *
  160. * any user (incl. administrator) on an Windows NT/2k/XP/Vista *
  161. * WITHOUT knowing the old password. *
  162. * Unlocking locked/disabled accounts also supported. *
  163. * *
  164. * It also has a registry editor, and there is now support for *
  165. * adding and deleting keys and values. *
  166. * *
  167. * Tested on: NT3.51 & NT4: Workstation, Server, PDC. *
  168. * Win2k Prof & Server to SP4. Cannot change AD. *
  169. * XP Home & Prof: up to SP2 *
  170. * Win 2003 Server (cannot change AD passwords) *
  171. * Vista 32 and 64 bit *
  172. * *
  173. * HINT: If things scroll by too fast, press SHIFT-PGUP/PGDOWN ... *
  174. *************************************************************************
  175.  
  176. =========================================================
  177. There are several steps to go through:
  178. - Disk select with optional loading of disk drivers
  179. - PATH select, where are the Windows systems files stored
  180. - File-select, what parts of registry we need
  181. - Then finally the password change or registry edit itself
  182. - If changes were made, write them back to disk
  183.  
  184. DON'T PANIC! Usually the defaults are OK, just press enter
  185. all the way through the questions
  186.  
  187. =========================================================
  188. � Step ONE: Select disk where the Windows installation is
  189. =========================================================
  190.  
  191. Disks:
  192. Disk /dev/sda: 42.9 GB, 42949672960 bytes
  193.  
  194. Candidate Windows partitions found:
  195. 1 : /dev/sda1 40958MB BOOT
  196.  
  197. Here it has found one disk with one partition
  198.  
  199. Please select partition by number or
  200. q = quit
  201. d = automatically start disk drivers
  202. m = manually select disk drivers to load
  203. f = fetch additional drivers from floppy / usb
  204. a = show all partitions found
  205. l = show propbable Windows (NTFS) partitions only
  206. Select: [1]
  207.  
  208. Here you select one of the partitions listed above (in this case there is only one) or one of the letters from the menu.
  209.  
  210. Floppy users may need to do 'f' to load in more drivers from another floppy.
  211.  
  212. The 'd' option will re-run the PCI scan and start relevant drivers (they must already be loaded from floppy with 'f' option)
  213.  
  214. The 'm' for manual load will present a list of all the drivers with short description if available, and allow you to specify which to load. (Dependecies are handled automatically)
  215.  
  216. Here we only have one partition, so we just press enter to select it.
  217.  
  218.  
  219. Selected 1
  220.  
  221. Mounting from /dev/sda1, with filesystem type NTFS
  222.  
  223. NTFS volume version 3.1.
  224.  
  225. It was an NTFS filesystem, and it mounted successfully.
  226.  
  227.  
  228. =========================================================
  229. � Step TWO: Select PATH and registry files
  230. =========================================================
  231. What is the path to the registry directory? (relative to windows disk)
  232. [WINDOWS/system32/config] :
  233.  
  234. The registry is usually system32/config under WINDOWS or WINNT directory, depending on the windows version (and it may be changed during installation).
  235. If the correct partition has been selected, the default prompt will be adjusted to match if it can find one of the usual variants.
  236.  
  237. We accept the defaults.. and get a (bit filtered) directory listing showing most of the interesting registry files
  238.  
  239.  
  240. -rw------- 2 0 0 262144 Feb 28 2007 BCD-Template
  241. -rw------- 2 0 0 6815744 Sep 23 12:33 COMPONENTS
  242. -rw------- 1 0 0 262144 Sep 23 12:33 DEFAULT
  243. drwx------ 1 0 0 0 Nov 2 2006 Journal
  244. drwx------ 1 0 0 8192 Sep 23 12:33 RegBack
  245. -rw------- 1 0 0 524288 Sep 23 12:33 SAM
  246. -rw------- 1 0 0 262144 Sep 23 12:33 SECURITY
  247. -rw------- 1 0 0 15728640 Sep 23 12:33 SOFTWARE
  248. -rw------- 1 0 0 9175040 Sep 23 12:33 SYSTEM
  249. drwx------ 1 0 0 4096 Nov 2 2006 TxR
  250. drwx------ 1 0 0 4096 Feb 27 2007 systemprofile
  251.  
  252. Select which part of registry to load, use predefined choices
  253. or list the files with space as delimiter
  254. 1 - Password reset [sam system security]
  255. 2 - RecoveryConsole parameters [software]
  256. q - quit - return to previous
  257. [1] :
  258.  
  259. Choice 1 is for password edit, most used.
  260. But if you wish, you can load any of the files (just enter it's name) and do manual registry edit on them.
  261.  
  262. But here, we select 1 for password edit, some files are copied around into memory and the edit application is invoked.
  263.  
  264.  
  265. Selected files: sam system security
  266. Copying sam system security to /tmp
  267.  
  268. =========================================================
  269. � Step THREE: Password or registry edit
  270. =========================================================
  271. chntpw version 0.99.5 070923 (decade), (c) Petter N Hagen
  272. Hive name (from header): <\SystemRoot\System32\Config\SAM>
  273. ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
  274. Page at 0x44000 is not 'hbin', assuming file contains garbage at end
  275. File size 524288 [80000] bytes, containing 11 pages (+ 1 headerpage)
  276. Used for data: 288/250904 blocks/bytes, unused: 15/23176 blocks/bytes.
  277.  
  278. Hive name (from header): <SYSTEM>
  279. ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c <lh>
  280. Page at 0x8b4000 is not 'hbin', assuming file contains garbage at end
  281. File size 9175040 [8c0000] bytes, containing 2117 pages (+ 1 headerpage)
  282. Used for data: 96982/6224016 blocks/bytes, unused: 4381/2830032 blocks/bytes.
  283.  
  284. Hive name (from header): <emRoot\System32\Config\SECURITY>
  285. ROOT KEY at offset: 0x001020 * Subkey indexing type is: 666c <lf>
  286. Page at 0x6000 is not 'hbin', assuming file contains garbage at end
  287. File size 262144 [40000] bytes, containing 5 pages (+ 1 headerpage)
  288. Used for data: 334/17312 blocks/bytes, unused: 7/3008 blocks/bytes.
  289.  
  290.  
  291. * SAM policy limits:
  292. Failed logins before lockout is: 0
  293. Minimum password length : 0
  294. Password history count : 0
  295.  
  296.  
  297. ======== chntpw Main Interactive Menu ========
  298.  
  299. Loaded hives:
  300.  
  301. 1 - Edit user data and passwords
  302. 2 - Syskey status & change
  303. 3 - RecoveryConsole settings
  304. - - -
  305. 9 - Registry editor, now with full write support!
  306. q - Quit (you will be asked if there is something to save)
  307.  
  308.  
  309. What to do? [1] ->
  310.  
  311. This demo shows selection 1 for password edit, but you can also do other things.
  312. Note that 2, Syskey may be dangerous! AND NOT NEEDED TO RESET PASSWORDS! and does not work at all on Vista, but you get some info before you do any changes.
  313.  
  314. Selection 3, RecoveryConsole is only relevant for Win2k, XP and 2003 and you must have selected to load the SOFTWARE part of the registry (selection 2) earlier.
  315.  
  316. The manual registry editor is always available, it is not the most user-friendly thing, but anyway..
  317.  
  318. We continue our quest to change our "admin" users password..
  319.  
  320.  
  321. ===== chntpw Edit User Info & Passwords ====
  322.  
  323. | RID -|---------- Username ------------| Admin? |- Lock? --|
  324. | 03e8 | admin | ADMIN | |
  325. | 01f4 | Administrator | ADMIN | dis/lock |
  326. | 03ec | grumf1 | | |
  327. | 03ed | grumf2 | | |
  328. | 03ee | grumf3 | | |
  329. | 01f5 | Guest | | dis/lock |
  330. | 03ea | jalla1 | ADMIN | *BLANK* |
  331. | 03eb | jalla2 | | *BLANK* |
  332. | 03e9 | petro | ADMIN | *BLANK* |
  333.  
  334. This is a list of all local users on the machine. You may see more users here than in the overly user-friendly control panel, for example XP has some help and support built in users.
  335. The users marked "ADMIN" are members of the administrators group, which means they have admin rights, if you can login to one of them you can get control of the machine.
  336.  
  337. The buildt in (at install time in all windows versions) administrator is always RID 01f4. This example is from Vista, and Vista by default has this locked down (the installer instead asks and makes another user the regular use administrator, in this case RID 03e8)
  338.  
  339. The "lock?" collumn show if the user account is disabled or locked out (due to many logon attempts for example) or BLANK if the password seems to be blank.
  340.  
  341. We select to edit the "admin" user (this was the user made administrator by the Vista installer)
  342.  
  343.  
  344. Select: ! - quit, . - list users, 0x - User with RID (hex)
  345. or simply enter the username to change: [Administrator] admin
  346.  
  347. RID : 1000 [03e8]
  348. Username: admin
  349. fullname:
  350. comment :
  351. homedir :
  352.  
  353. User is member of 1 groups:
  354. 00000220 = Administrators (which has 4 members)
  355.  
  356. Group 220 is THE BOSS GROUP! :)
  357.  
  358. Account bits: 0x0214 =
  359. [ ] Disabled | [ ] Homedir req. | [X] Passwd not req. |
  360. [ ] Temp. duplicate | [X] Normal account | [ ] NMS account |
  361. [ ] Domain trust ac | [ ] Wks trust act. | [ ] Srv trust act |
  362. [X] Pwd don't expir | [ ] Auto lockout | [ ] (unknown 0x08) |
  363. [ ] (unknown 0x10) | [ ] (unknown 0x20) | [ ] (unknown 0x40) |
  364.  
  365. Failed login count: 0, while max tries is: 0
  366. Total login count: 3
  367.  
  368. Some status info, user is locked out if "Disabled" is set or "Failed login count" is larger than "max tries" policy setting. This user is not locked in any way. The lockout can be reset with option 4 below.
  369.  
  370. - - - - User Edit Menu:
  371. 1 - Clear (blank) user password
  372. 2 - Edit (set new) user password (careful with this on XP or Vista)
  373. 3 - Promote user (make user an administrator)
  374. (4 - Unlock and enable user account) [seems unlocked already]
  375. q - Quit editing user, back to user select
  376. Select: [q] > 1
  377. Password cleared!
  378.  
  379. Here we just reset/clear/blank the password.
  380. But you can also try to set a new password with option 2, but it will only work if the password is not blank already. Also, it often fails to work on XP and newer systems.
  381.  
  382. Number 3 is to put a non-admin user into the administrators (220) group, thus making the user an administrator. IT IS STILL EXPERIMENTAL AND IT MAY sometimes RESULT IN STRANGE ERRORS WHEN LATER EDITING THE GROUP FROM WINDOWS! Also, usually pointless in promoting the Guest user, as it is most likely forbidden to log in by the security policy settings.
  383.  
  384.  
  385. Select: ! - quit, . - list users, 0x - User with RID (hex)
  386. or simply enter the username to change: [Administrator] !
  387.  
  388. Exclamation point ! quits out (it's SHIFT 1 on the US keyboard layout used on the boot CD)
  389. Then we get back to the main menu, and select to quit..
  390.  
  391.  
  392. ======== chntpw Main Interactive Menu ========
  393.  
  394. Loaded hives: <sam> <system> <security>
  395.  
  396. 1 - Edit user data and passwords
  397. 2 - Syskey status & change
  398. 3 - RecoveryConsole settings
  399. - - -
  400. 9 - Registry editor, now with full write support!
  401. q - Quit (you will be asked if there is something to save)
  402.  
  403.  
  404. What to do? [1] -> q
  405.  
  406. Hives that have changed:
  407. # Name
  408. 0 - OK
  409.  
  410. =========================================================
  411. � Step FOUR: Writing back changes
  412. =========================================================
  413. About to write file(s) back! Do it? [n] : y
  414.  
  415. You must answer y, or the changes will not be saved. This is the last chance to change your mind!
  416.  
  417. Writing sam
  418.  
  419. Only changed files of the registry are actually written back.
  420.  
  421. If you forgot something, you may run again, else press CTRL-ALT-DEL to reboot.
  422.  
  423.  
  424. ***** EDIT COMPLETE *****
  425.  
  426. You can try again if it somehow failed, or you selected wrong
  427. New run? [n] : n
  428. =========================================================
  429.  
  430. * end of scripts.. returning to the shell..
  431. * Press CTRL-ALT-DEL to reboot now (remove floppy first)
  432. * or do whatever you want from the shell..
  433. * However, if you mount something, remember to umount before reboot
  434. * You may also restart the script procedure with 'sh /scripts/main.sh'
  435.  
  436. (Please ignore the message about job control, it is not relevant)
  437.  
  438.  
  439. BusyBox v1.1.0-pre1 (2005.12.30-19:45+0000) Built-in shell (ash)
  440. Enter 'help' for a list of built-in commands.
  441.  
  442. sh: can't access tty; job control turned off
  443. And I got about a gazillion questions on this error message, even if it is mentioned in the FAQ It is from the shell telling it cannot do "job control" which means it cannot handle CTRL-C etc. It HAS NOTHING TO DO WITH YOUR PASSWORD RESET DID NOT WORK! That is caused by a lot of other things.
  444.  
  445.  
  446. 070923, pnh@pogostick.net
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement