Over the years, I have used a number of different tools to manage (e)SIM cards, and it has always felt clunky swapping between different environments—sometimes CLI-only, sometimes a GUI. One of my biggest pain points has always been that there isn’t a single tool capable of handling the entire width of the (e)SIM stack; you are always left juggling at least a couple of them.
I had personally been using pysim alongside GlobalPlatformPro, plus a few proprietary tools from vendors like Thales, Comprion, etc. This worked fine until I decided to move away from Windows in favor of Linux, at which point I realized the proprietary tools no longer worked as they are Windows-exclusive.
Instead of moving back to Windows, I decided to build the comprehensive orchestration platform I had been missing. YggdraSIM utilizes the amazing work by the Osmocom community (especially the pysim and simtrace2 teams) to tie all the loose ends together with a heavy focus on workflow orchestration.
The result is YggdraSIM, featuring:
- Card Admin Shell (SCP03 + ETSI File System): Local management, script execution, and full file-system dumping.
- OTA Simulator (SCP80): Remote management and script execution.
- eSIM Relay (SGP.22+32): Both Live and Test certificate flows.
- Local eIM (SGP.32): Full SGP.32 package loading.
- Local SM-DP+: Load and tear down profiles completely offline to test card behavior without a server in the loop.
- SAIP Tool: Powered by upstream
pySim. Inspect, lint (against interoperability specs), transcode, interactively build, and hex-decode profile packages.
- SUCI Tool: 5G SUCI key management.
- HIL Bridge: A
SIMtrace2-backed bridge. Lets a real card sit in a reader while serving a modem, with full APDU capture and a Wireshark mirror over GSMTAP.
- Simulated Backend: An in-process simulated UICC/eUICC backend for testing without physical hardware.
v1.0.0 Release: GitHub: https://github.com/1ot/YggdraSIM
More QoL updates (such as a GUI) are on the way. I would love to hear your thoughts and feedback
5 Likes
Welcome, and thanks for sharing news about your project here… and of course for releasing it as FOSS in the first place. I haven’t yet played with it, just did some casual browsing of the repository.
I’m a bit surprised that things like SCP03 or SCP80 are not simply using the code within pySim - there probably could have been a lot more code re-use. Did you run into bugs or architectural limitations within pySim?
Everyone is of course free to develop whichever way they want, I just can’t help but to always approach things from a “let’s use our limited resources in FOSS telecom to make sure we have every feature/technology implemented as FOSS at least once” rather than “let’s use our limited resources to implement the same thing multiple times in FOSS”.
In general I would like to explore if there is some interest in removing code duplication and collectively maitaning one implementation of a given library/module, rather than multiple implementations in parallel. I’m happy to discuss modifications of the pySim structure and interfaces, as well as releasing whatever common code as separate libraries on pypi.
Thank you!
The project started as a combination of standalone scripts and a personal exercise in “can I do it?”. Once I actually got SCP03 and SCP80 working I simply left it as-is and focused on the SCP11 modules and other quality of life and workflow functions.
I started using pysim as an upstream dependency when I got stuck in the SCP11 flows and from there I figured I might just utilize it going from there and kind of forgot to go back and introduce it into the modules I considered “complete” in terms of cryptography.
I also see some work-around around what actually appear to be asn1tools issues like the endless loops; would be great to get those fixed in upstream rather than implementing work-arounds two projects downstream (behind pySim.esim.saip).
I also have some WIP improvements to asn1tools like GitHub - osmocom/asn1tools at laforge/named-integers · GitHub which I would love to get completed/merged, but which would have positive but incompatible consequences to all downstream users who suddenly don’t have to deal with numeric values for named integers anymore.
Are you interested in collaborating addressing some of those problems and improving the overall stack?
given that OsmoDevCalls are sort-of dead for quite some time: This might be an excellent topic to resurrect one. Would you be interested in presenting and demoing YggdraSIM in that format?
2 Likes
I really appreciate the invitation! I enjoy the puzzle of ASN.1 parsing, so I’m very much interested. My free time is a balancing act between work and family, so my contributions might be a bit sporadic, but I’d love to collaborate on improving the upstream stack.
As for the OsmoDevCall, I would be absolutely honored.
2 Likes
I completely agree with that the the telecom FOSS community is small and need to manage resources.
The project is far from complete (if it will ever be) and doing maintenance is a given. The feedback is welcome and helpful and I will look into dropping the duplications in my code in favor of a pysim dependency. That definitely feels like the correct way forward for the project at this point and to better handle it long-term.
Once again I am amazed by the pysim tool and what you guys have accomplished over the years and want to utilize it in the best possible way for all parties.
2 Likes
Might not be the correct place to put this, if so, please remove or move this comment/addition.
Saw some time ago some mentions of the request to port simtrace2 to windows.
I updated the tool to allow remote APDU streaming over LAN/VPN + SSH with full packet inspection via GSMTAP. Essentially making the HiL feature work with remote hosts. You can then spin up an RaspberryPi, attach a modem and simtrace2 (running osmocom remsim) and install YggdraSIM and now you can access the simtrace2 functionality through the tool on any OS/kernel.
RaspberryPi will serve the simtrace2 kernel requirements and users can now access the packet inspection/Wireshark without the need for clunky remote desktop setups like rustdesk/VNC or other.
And you can now hide the physical modem/raspberry in a cupboard as the tool streams the SIM APDUs from the PC card reader/slot through the tool SSH tunnel, to the simtrace2 and to the modem.
Updates to public repo will follow once all testing has been completed
1 Like
Hello Hellsberg, thanks very much.
I am very interested in this tracer/sniffer,
this hardware you mention simtrace2, is this same one sold in sysmocom, correct?
Kindly let us know when we could download, as i am looking forward to do some testing with the raspberry.
thanks and well done!!!
Yes, it is the sysmocom simtrace2 re-flashed with remsim firmware.
Goal is to have it stable enough for a release by next week.
Documentation and guides will be included with the release.