Hacking DIY amiibo cards

fraret

A puffin
Member
Joined
Nov 22, 2015
Messages
100
Trophies
0
Location
Interblag
Website
localhost
XP
151
Country
Alright, so I'm equipped with everything I need to give this a shot today:
- blank NTAG215 tags
- Amiibo dump
- hex editor
- the key to encrypt it
- Android smartphone with AmiiWrite

1) I decrypted the Amiibo dump
2) I read the NTAG215 with Android app NFC TagInfo to get the 7-byte UID.
3) I opened the Amiibo dump in a hex editor...

Where is the location of the UID to change it?
The UID is the first seven bytes of the encrypted dump, so you can search it the decrypted dump and change it.

EDIT: javiMaD is right. The location of the UID in the decrypted dump starts at 0x1d4. Also, are you using the API or amiitool?
 
Last edited by fraret,
  • Like
Reactions: fiveighteen

fiveighteen

Distractible Dabbler
Member
Joined
Jun 30, 2008
Messages
1,768
Trophies
2
XP
1,930
Country
United States
NTAG 215 UID:
04 C3 7A 52 C2 3E 80

DUCK HUNT DUO UID:
04 FC 30 40 82 03 49 80

It concerns me that they both start with 04 and end with 80 but there's an extra byte in the middle of the Amiibo.

Should I be changing Duck Hunt Duo to:
04 C3 7A 52 C2 3E 80 80 ??
 

javiMaD

Active Member
Newcomer
Joined
Jan 31, 2015
Messages
37
Trophies
0
Location
0's and 1's
XP
315
Country
NTAG 215 UID:
04 C3 7A 52 C2 3E 80

DUCK HUNT DUO UID:
04 FC 30 40 82 03 49 80

It concerns me that they both start with 04 and end with 80 but there's an extra byte in the middle of the Amiibo.

Should I be changing Duck Hunt Duo to:
04 C3 7A 52 C2 3E 80 80 ??
Extra byte is BCC0 = 0x88 xor UID0 xor UID1 xor UID2

88 xor 04 xor C3 xor 7A = 35

04 C3 7A 35 52 C2 3E 80
 
  • Like
Reactions: dibas and fraret

Julizi

Well-Known Member
Member
Joined
Jul 3, 2015
Messages
110
Trophies
0
Age
124
XP
348
Country
Germany
Does this work with every smartphone? I installed amiiWrite on my S3 mini (NFC version) but everytime I want to dump an amiibo it says "Woops! Please retry!"
 

Supercool330

Well-Known Member
Member
Joined
Sep 28, 2008
Messages
752
Trophies
1
XP
1,129
Country
United States
Hmm, is there another signature or something that needs to be fixed besides the one at 0x80 (page 0x20)? I wrote an android app, and everything seems to be working; the decrypted dump from the fake matches the real one exactly except for the aforementioned hash and the UID, and the signature check and pwd seem fine, but when I scan it with the 3DS I get error 037-0524 "This is an invalid amiibo". Any ideas?
 
D

Deleted User

Guest
EDIT: I'm essentially asking if someone knows an easy way to calculate that extra byte.

--------------------- MERGED ---------------------------

Isn't it easier to buy these cards and put a sticker on it?
NFC Card
http://www.aliexpress.com/item/100p...ll-NFC-Mobile-Phone-NFC-Card/32258165667.html

Yes those are NTAG215s apparently so they should work.

And this should work as a writer? NFC Reader/Writer
Well that depends upon if there's any tool for it. I'd personally just use AmiiWrite and a cheap android with NFC.
 
Last edited by ,
  • Like
Reactions: TotalInsanity4

Supercool330

Well-Known Member
Member
Joined
Sep 28, 2008
Messages
752
Trophies
1
XP
1,129
Country
United States
EDIT: I'm essentially asking if someone knows an easy way to calculate that extra byte.
The first 10 bytes of the tag are determined by the NFC type A spec.

0: UID0 - the manufacturer code, always 0x04 for any NXP tag
1: UID1
2: UID2
3: BCC0 - CT ^ UID0 ^ UID1 ^ UID2 (CT is 0x88)
4: UID3 - Can't be CT (0x88)
5: UID4
6: UID5
7: UID6
8: BCC1 - UID3 ^ UID4 ^ UID5 ^ UID6
9: Internal - Always 0x48

Note that you can't actually write to any of these bytes on an actual NTAG, the first two pages are locked at the factory, and trying to write values to the first two bytes of the 3rd page does nothing (thus the static lock bytes can be set without worrying about the first two bytes of the write). Also note, that tags with 4 or 10 byte UIDs have a different layout (all NTAG21x tags have 7 byte UIDs).
 
Last edited by Supercool330,

fiveighteen

Distractible Dabbler
Member
Joined
Jun 30, 2008
Messages
1,768
Trophies
2
XP
1,930
Country
United States
EDIT: I'm essentially asking if someone knows an easy way to calculate that extra byte.
(example for the UID I was using)

Extra byte UID3:
= 0x88 xor UID0 xor UID1 xor UID2
= 88 xor 04 xor C3 xor 7A
= ((10001000 xor 00000100) xor 11000011) xor 01111010
= (10001100 xor 11000011) xor 01111010
= 01001111 xor 01111010
= 00110101
= 35

XOR Truth Table:
AB | Q
00 | 0
01 | 1
10 | 1
11 | 0
 
Last edited by fiveighteen, , Reason: added xor truth table
  • Like
Reactions: Deleted User
D

Deleted User

Guest
My head hurts from this xD
If someone can make a way to calculate this either online or as a program, I swear I will <3 you forever
 

Supercool330

Well-Known Member
Member
Joined
Sep 28, 2008
Messages
752
Trophies
1
XP
1,129
Country
United States
How would you put that into something like PHP?
PHP (which is the worst langauge ever) actually supports xor, it is literally just "xor". It also supports hex litterals, so your code could look something like:

$bcc0 = 0x88 xor $uid[0] xor $uid[1] xor $uid[2]
$bcc1 = $uid[3] xor $uid[4] xor $uid[5] xor $uid[6]

...I think I need to take a shower; I hate PHP
 
D

Deleted User

Guest
That was easy, and I was able to calculate the value correctly, thanks!
Also, PHP I like simply because it lets me make small mistakes (as long as it isn't forgetting ; or ") then IK what I messed up upon.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    The snack that smiles back, Ballsack!
    SylverReZ @ SylverReZ: @AncientBoi