[GH-ISSUE #22] [BUG] 5ber compatibility issue #9

Closed
opened 2026-03-04 23:13:25 +03:00 by kerem · 9 comments
Owner

Originally created by @joeyoropesa-dev on GitHub (Oct 2, 2024).
Original GitHub issue: https://github.com/creamlike1024/EasyLPAC/issues/22

These are errors that are coming from lpac after trying to connect to 5ber card.

SCardTransmit() failed: 8010002F
SCardTransmit() failed: 0000045D

And after getting this error, I'm getting this error

SCardTransmit() failed: 0000045D
SCardTransmit() failed: 0000045D
Originally created by @joeyoropesa-dev on GitHub (Oct 2, 2024). Original GitHub issue: https://github.com/creamlike1024/EasyLPAC/issues/22 These are errors that are coming from lpac after trying to connect to 5ber card. ``` SCardTransmit() failed: 8010002F SCardTransmit() failed: 0000045D ``` And after getting this error, I'm getting this error ``` SCardTransmit() failed: 0000045D SCardTransmit() failed: 0000045D ```
kerem closed this issue 2026-03-04 23:13:26 +03:00
Author
Owner

@creamlike1024 commented on GitHub (Oct 4, 2024):

Please report it to https://github.com/estkme-group/lpac

<!-- gh-comment-id:2392865402 --> @creamlike1024 commented on GitHub (Oct 4, 2024): Please report it to https://github.com/estkme-group/lpac
Author
Owner

@creamlike1024 commented on GitHub (Jan 5, 2025):

Please check if 0.7.7.1(https://github.com/creamlike1024/EasyLPAC/releases/tag/0.7.7.1) can be used with 5ber. Go to Settings -> lpac ISD-R AID and click 5ber to set 5ber's custom AID
Screenshot 2025-01-05 at 8 55 41 PM

<!-- gh-comment-id:2571618125 --> @creamlike1024 commented on GitHub (Jan 5, 2025): Please check if 0.7.7.1(https://github.com/creamlike1024/EasyLPAC/releases/tag/0.7.7.1) can be used with 5ber. Go to Settings -> lpac ISD-R AID and click 5ber to set 5ber's custom AID <img width="523" alt="Screenshot 2025-01-05 at 8 55 41 PM" src="https://github.com/user-attachments/assets/bc8a0847-db18-49ba-80aa-8449dcbd6bfb" />
Author
Owner

@borghorst commented on GitHub (Jan 5, 2025):

Works fine for me with 5ber standard SIM and custom AID

<!-- gh-comment-id:2571641573 --> @borghorst commented on GitHub (Jan 5, 2025): Works fine for me with 5ber standard SIM and custom AID
Author
Owner

@joeyoropesa-dev commented on GitHub (Jan 5, 2025):

Please check if 0.7.7.1(https://github.com/creamlike1024/EasyLPAC/releases/tag/0.7.7.1) can be used with 5ber. Go to Settings -> lpac ISD-R AID and click 5ber to set 5ber's custom AID
Screenshot 2025-01-05 at 8 55 41 PM

Is that custom AID for 5ber Ultra and new generation of Standard editions by 5ber.eSIM

Or somehow there is an tool we can use to extract AID from the card.

<!-- gh-comment-id:2571715835 --> @joeyoropesa-dev commented on GitHub (Jan 5, 2025): > Please check if 0.7.7.1(https://github.com/creamlike1024/EasyLPAC/releases/tag/0.7.7.1) can be used with 5ber. Go to Settings -> lpac ISD-R AID and click 5ber to set 5ber's custom AID > <img width="523" alt="Screenshot 2025-01-05 at 8 55 41 PM" src="https://github.com/user-attachments/assets/bc8a0847-db18-49ba-80aa-8449dcbd6bfb" /> > Is that custom AID for 5ber Ultra and new generation of Standard editions by 5ber.eSIM Or somehow there is an tool we can use to extract AID from the card.
Author
Owner

@Root-Core commented on GitHub (Jan 5, 2025):

@joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra.

We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now.

@creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)?

<!-- gh-comment-id:2571755986 --> @Root-Core commented on GitHub (Jan 5, 2025): @joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra. We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now. @creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)?
Author
Owner

@creamlike1024 commented on GitHub (Jan 5, 2025):

@joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra.

We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now.

@creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)?

I don't know a reliable method to determine if a card is a 5ber, as EasyLPAC is only a GUI frontend for lpac, and all interactions with euicc are completed by lpac. The error message caused by lpac using "incorrect" AID for 5ber is ambiguous, and lpac is unwilling to support cards like 5ber that do not comply with specifications, so support for 5ber can only be in this awkward situation.

<!-- gh-comment-id:2571795037 --> @creamlike1024 commented on GitHub (Jan 5, 2025): > @joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra. > > We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now. > > @creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)? I don't know a reliable method to determine if a card is a 5ber, as EasyLPAC is only a GUI frontend for lpac, and all interactions with euicc are completed by lpac. The error message caused by lpac using "incorrect" AID for 5ber is ambiguous, and lpac is unwilling to support cards like 5ber that do not comply with specifications, so support for 5ber can only be in this awkward situation.
Author
Owner

@Root-Core commented on GitHub (Jan 6, 2025):

Yeah.. I had a version of lpac that tried first the default AID and then the 5ber AID. So it was actually automatic.. but it would not be accepted, so I changed it to the current implementation. The logic was quiet simple and could be used here too. Try reading with the default, then with the 5ber AID. If both fail, throw the error.

It's not the cleanest solution and the current solution isn't that bad. So it might be okay in it's current form.

<!-- gh-comment-id:2572222967 --> @Root-Core commented on GitHub (Jan 6, 2025): Yeah.. I had a version of lpac that tried first the default AID and then the 5ber AID. So it was actually automatic.. but it would not be accepted, so I changed it to the current implementation. The logic was quiet simple and could be used here too. Try reading with the default, then with the 5ber AID. If both fail, throw the error. It's not the cleanest solution and the current solution isn't that bad. So it might be okay in it's current form.
Author
Owner

@joeyoropesa-dev commented on GitHub (Jan 6, 2025):

@joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra.

We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now.

@creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)?

Tested and I can confirm that this AID is fully compatible with 5ber.eSIM Ultra other editions too. 5ber compatibility has been fixed. Thank you all for your efforts making this possible!

Btw how did you manage to find out what AID was behind eUICC chip for 5ber eSIM cards. If this method gets shared with us, that would make things much more easier in the future to find out what AID eSIM adapters have to be used in these purposes.

Also, could we extract now eSIM profiles from the adapter? Thank you in advance!

<!-- gh-comment-id:2573099137 --> @joeyoropesa-dev commented on GitHub (Jan 6, 2025): > @joeyoropesa-dev I implemented this for 5ber Standard, but it should work for 5ber Ultra too. I'm not sure though, as I don't own the Ultra. So it would be awesome, if you (or somebody else) could test it with the Ultra. > > We could certainly write a function / tool / script for testing AIDs, but I think it's not worth the effort right now. Only 5ber is incompatible yet, as far as I know.. and that's "fixed" now. > > @creamlike1024 Would you be okay with an automated approach, like iterating over known AIDs? So you don't need to click the 5ber button? Or maybe identify 5ber cards automatically (via. ATR or similar)? Tested and I can confirm that this AID is fully compatible with 5ber.eSIM Ultra other editions too. **5ber compatibility has been fixed**. Thank you all for your efforts making this possible! Btw how did you manage to find out what AID was behind eUICC chip for 5ber eSIM cards. If this method gets shared with us, that would make things much more easier in the future to find out what AID eSIM adapters have to be used in these purposes. Also, could we extract now eSIM profiles from the adapter? Thank you in advance!
Author
Owner

@Root-Core commented on GitHub (Jan 6, 2025):

TBH, it was just from a commit at the NekokoLPA.

But it's quiet easy.. just use a script to iterate over the AIDs. Assuming that the A0 00 00 05 59 is fixed, as defined in ISO/IEC 7816-5:2004, and most probably the 10 10 FF FF FF FF 89 part, we only have 2 bytes left to check: 00 00 01 00. There are also some other reserved AIDs that could be skipped. So after a maximum of around 65k iterations, you should know the AID.

Or just decompile the official app.

They certainly could implement better security mechanisms, but I think they wont. It seems 5ber doesn't develop the Firmware themself and changing the AID could be done simply via. a hex editor. And then again.. after decompiling / sniffing the official app, these mechanisms could easily be implemented in lpac.

<!-- gh-comment-id:2573173883 --> @Root-Core commented on GitHub (Jan 6, 2025): TBH, it was just from [a commit at the NekokoLPA](https://github.com/iebb/NekokoLPA/commit/54daae783bf3fb0d26a4ed937f33c7bb39e46619). But it's quiet easy.. just use a script to iterate over the AIDs. Assuming that the `A0 00 00 05 59` is fixed, as defined in ISO/IEC 7816-5:2004, and most probably the `10 10 FF FF FF FF 89` part, we only have 2 bytes left to check: `00 00 01 00`. There are also some other reserved AIDs that could be skipped. So after a maximum of around 65k iterations, you should know the AID. Or just decompile the official app. They certainly could implement better security mechanisms, but I think they wont. It seems 5ber doesn't develop the Firmware themself and changing the AID could be done simply via. a hex editor. And then again.. after decompiling / sniffing the official app, these mechanisms could easily be implemented in lpac.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/EasyLPAC#9
No description provided.