USB Dongle Authenticator: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
note: inside ss_server1.fself | note: inside ss_server1.fself | ||
Dongle check is done on Lv2 kernel start up | Dongle check is done on Lv2 kernel start up | ||
File /dev_usb000/pmode_param.txt used by lv2 since fw 3.60 | |||
{| class="wikitable FCK__ShowTableBorders" | {| class="wikitable FCK__ShowTableBorders" | ||
Line 53: | Line 54: | ||
*Unfortunately, in the HV dump 3.15 the USB Dongle Master Key was not decrypted at the moment of dumping | *Unfortunately, in the HV dump 3.15 the USB Dongle Master Key was not decrypted at the moment of dumping | ||
*The first 12 bytes of decrypted USB Dongle Master Key is a magic value: '''_USB_DONGLE_'''. After these 12 bytes follows the real USB Dongle Master Key of size 20 bytes. So, if after decryption of USB Dongle Master Key, you see this magic value then the decryption was successfull. | *The first 12 bytes of decrypted USB Dongle Master Key is a magic value: '''_USB_DONGLE_'''. After these 12 bytes follows the real USB Dongle Master Key of size 20 bytes. So, if after decryption of USB Dongle Master Key, you see this magic value then the decryption was successfull. | ||
*To decrypt USB Dongle master key you need SC Iso Encrypt/Decrypt 5 Key, Lpar Auth ID (0x1070000001000001), Program Auth ID (0x1070000045000001) and use VTRM Decrypt Master with the Master Key | *To decrypt USB Dongle master key you need SC Iso Encrypt/Decrypt 5 Key, seed, Lpar Auth ID (0x1070000001000001), Program Auth ID (0x1070000045000001) and use VTRM Decrypt Master with the Master Key | ||
Line 64: | Line 65: | ||
25 33 E0 96 F2 C1 91 0D 15 23 D3 07 74 E7 2B 72 | 25 33 E0 96 F2 C1 91 0D 15 23 D3 07 74 E7 2B 72 | ||
DF A6 DD E9 68 8B 76 2A 6A 87 51 7F 85 39 0B D4 | DF A6 DD E9 68 8B 76 2A 6A 87 51 7F 85 39 0B D4 | ||
20 3F 46 89 04 82 B7 30 84 89 4B CC 9D B1 24 7C</pre> || <pre></pre> | 20 3F 46 89 04 82 B7 30 84 89 4B CC 9D B1 24 7C</pre> || <pre>8E 51 45 76 4B 66 35 2D 69 4A 38 D6 F8 71 CD 1A | ||
25 26 D9 8E 0F 3D 2D D2 1F DC FC CF 1C F7 28 5F | |||
C6 6E C7 03 DB 62 7F 86 AA F6 B9 55 11 D8 64 DD | |||
34 72 C3 59 A0 C4 83 A3 F7 C1 5B 40 32 53 D8 C3</pre> | |||
|- | |||
|} | |||
This is the 16 bytes ''' seed''': | |||
{| class="wikitable" | |||
|- | |||
! 3.15 !! 4.xx | |||
|- | |||
| <pre>5F 55 53 42 5F 44 4F 4E 47 4C 45 5F 41 55 54 48</pre> || <pre>5F 55 53 42 5F 44 4F 4E 47 4C 45 5F 41 55 54 48</pre> | |||
|- | |- | ||
|} | |} | ||
Line 75: | Line 88: | ||
|- | |- | ||
| <pre>46 DC EA D3 17 FE 45 D8 09 23 | | <pre>46 DC EA D3 17 FE 45 D8 09 23 | ||
EB 97 E4 95 64 10 D4 CD B2 C2</pre> || <pre></pre> | EB 97 E4 95 64 10 D4 CD B2 C2</pre> || <pre>46 DC EA D3 17 FE 45 D8 09 23 | ||
EB 97 E4 95 64 10 D4 CD B2 C2</pre> | |||
|- | |- | ||
|} | |} | ||
Line 111: | Line 125: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! 3.15 !! 4. | ! 3.15 !! 4.70 | ||
|- | |- | ||
| <pre>0, 2, 13, 32, 34, 176, 241</pre> || <pre></pre> | | <pre>0, 2, 13, 32, 34, 176, 241</pre> || <pre>0, 2, 13, 32, 34, 176, 241, 286</pre> | ||
|- | |- | ||
|} | |} |
Latest revision as of 11:30, 1 October 2018
0x24000 - USB Dongle Authenticator[edit | edit source]
note: inside ss_server1.fself Dongle check is done on Lv2 kernel start up File /dev_usb000/pmode_param.txt used by lv2 since fw 3.60
Packet ID | Description |
---|---|
0x24001 | Generate Challenge |
0x24002 | Verify Response |
0x24001 - Generate Challenge[edit | edit source]
- I have got access to this service through DM and tested it
- The service expects no input parameters except those in SS packet header
- It uses 0x5003 service (Generate Random Number) to generate random numbers that are used in challenge body
- The length of a challnge body is always 23 bytes, first 3 bytes are always the same: 0x2E 0x02 0x01
Here are hexdumps of some challenge bodies i let 0x24001 service generate:
2E 02 01 72 3A 0A 76 BB 81 CB 29 BC E7 B5 D6 62 7C 0E EE 23 18 A9 1D
2E 02 01 F0 DA 78 D4 1D CB D7 C9 C7 F0 32 F4 2E 92 39 BD 3F 32 93 AA
2E 02 01 3B B2 9D FD A8 83 AF 9A C0 E9 13 BB AE D5 6C 8C 45 2E DE 13
0x24002 - Verify Response[edit | edit source]
- I have got access to this service and tested it with PSGroove
- The response body is 25 bytes large
- The first 3 bytes have to be 0x2E 0x02 0x02 or else the check fails
- The 16 bit at offset 3 is a dongle ID
- The dongle ID is checked if it's revoked or not
- When the verification succeedes then product mode is set to 1
- The service calculates USB Dongle Key from USB Dongle ID and USB Dongle Master Key by using HMAC SHA-1
- The service uses HMAC SHA-1 to calculate the correct response body from the challenge body and USB Dongle Key
- After that the service compares the calculated response body with the given one that was sent to the service
- It seems that laid and paid from SS packet header are used in decryption process
USB Dongle Master Key[edit | edit source]
- USB Dongle Master Key is stored encrypted in Process 6
- The encrypted key is 64 bytes large
- The decrypted key is 20 bytes large
- The USB Dongle Master Key is decrypted first time the service 0x24002 is used
- The USB Dongle Master Key is decrypted by using the service 0x200E (Decrypt Master) of Vitual TRM Manager
- The decrypted USB Dongle Master Key is stored in Process 6 in clear text (after first usage of this service)
- When decryption of USB Dongle Master Key fails then a dummy key is used
- Unfortunately, in the HV dump 3.15 the USB Dongle Master Key was not decrypted at the moment of dumping
- The first 12 bytes of decrypted USB Dongle Master Key is a magic value: _USB_DONGLE_. After these 12 bytes follows the real USB Dongle Master Key of size 20 bytes. So, if after decryption of USB Dongle Master Key, you see this magic value then the decryption was successfull.
- To decrypt USB Dongle master key you need SC Iso Encrypt/Decrypt 5 Key, seed, Lpar Auth ID (0x1070000001000001), Program Auth ID (0x1070000045000001) and use VTRM Decrypt Master with the Master Key
Here is the encrypted USB Dongle Master Key from HV:
3.15 | 4.xx |
---|---|
22 D5 D1 8C FF E2 4F AC EC 72 A2 42 A7 18 98 10 25 33 E0 96 F2 C1 91 0D 15 23 D3 07 74 E7 2B 72 DF A6 DD E9 68 8B 76 2A 6A 87 51 7F 85 39 0B D4 20 3F 46 89 04 82 B7 30 84 89 4B CC 9D B1 24 7C |
8E 51 45 76 4B 66 35 2D 69 4A 38 D6 F8 71 CD 1A 25 26 D9 8E 0F 3D 2D D2 1F DC FC CF 1C F7 28 5F C6 6E C7 03 DB 62 7F 86 AA F6 B9 55 11 D8 64 DD 34 72 C3 59 A0 C4 83 A3 F7 C1 5B 40 32 53 D8 C3 |
This is the 16 bytes seed:
3.15 | 4.xx |
---|---|
5F 55 53 42 5F 44 4F 4E 47 4C 45 5F 41 55 54 48 |
5F 55 53 42 5F 44 4F 4E 47 4C 45 5F 41 55 54 48 |
This is the decrypted dongle master key:
3.15 | 4.xx |
---|---|
46 DC EA D3 17 FE 45 D8 09 23 EB 97 E4 95 64 10 D4 CD B2 C2 |
46 DC EA D3 17 FE 45 D8 09 23 EB 97 E4 95 64 10 D4 CD B2 C2 |
This is the decrypted dongle key for dongle ID 0xAAAA :
3.15-3.55 | 4.xx |
---|---|
04 4E 61 1B A6 A6 E3 9A 98 CF 35 81 2C 80 68 C7 FC 5F 7A E8 |
Here is the USB Dongle Master Dummy Key from HV:
3.15 | 4.xx |
---|---|
D1 FC 57 55 BF 20 FA B2 D4 A5 4A 0A 0C 5D 52 8E DF 66 CD 74 |
USB Dongle ID Revoke List[edit | edit source]
- Process 6 contains a revoke list for USB Dongle IDs
- The revoke list is 0x2000 bytes large. It's a bitmap.
- Each bit represents a USB Dongle ID. If bit is 0 then USB Dongle ID is revoked.
The following USB Dongle IDs are revoked in HV:
3.15 | 4.70 |
---|---|
0, 2, 13, 32, 34, 176, 241 |
0, 2, 13, 32, 34, 176, 241, 286 |