Closed BreakSecurity closed 4 years ago
Hi there, I am not sure how you did "2.1. Modify the 0x09 page with all zeros"? Could you explain this please?
I loaded the JSON dump, read the emulated tag through the app UltraManager Pro on a Nexus 5 phone, and write all zeros to page 09 (that is locked by bytes in page 02). The write is successful because if I read the tag again I see all zeros on page 09. After some readout of the emulated tag, the led stop working and the chameleon is dead. I was able to solve only by flashing again.
So there are two things as I see it: 1) you are surprised to see that locked pages can be zeroed, 2) you manage to trigger a chameleon hangout when you read ULTRALIGHT_EV1_80B dumps.
1) This may be wanted in fact. Do not know anything about Ultralight, but maybe @McEloff can help, as he patched Ultralight code precisely so we can zero locked pages in #142 (see this diff).
2) This will have to be narrowed down. There is a memory management issue with Ultralight as it is now, because it tries to write data out of bound (to store a "password", but this should not break the whole Chameleon. Can you try again to trigger this bug, and help us finding out how it is triggered (does that also happens with other configs, other Ultralight dumps, is this on any reading sequence or on specific reading contexts, etc.) ?
Hi! Commit #142 fixes only manipulations with pages 2 and 3 of Ultralight. Lock-bits (page 2) and OTP-bits (page 3) cannot be resets to zero if was sets previously. For example, if page 3 = 0x0007 and you try to write to page 3 value of 0x0008, result will be as "logical bitwise OR" = 0x000F. For lock-bits (page 2) so on. My commit not fixes write access to pages locked by lock-bits in page 2.
Closed due to lack of feedback.
Environment
hf mfu dump
Bug description
Expected function and references
After dump upload if I try to change sector 0x09 to all zeros Chamaleon freeze after some reads of the modified slot. No led light and the only possible solution is to reflash. Page 0x09 is locked but chamaleon let you wrote on it anyway.
Steps to Reproduce
Resolution paths
Ideas
Possible Implementation
Something to do with lock bytes maybe... https://github.com/iceman1001/ChameleonMini-rebooted/blob/d044bb42241720f21e59690b012056fd4140109a/Firmware/ChameleonMini/Application/MifareUltralight.c#L200
Json: