Last year I worked with a group of people to set up a GSM cell network at the second Toorcamp, a hacker camping conference on the Washington coast. My responsibilty was to procure SIM cards that would allow phones to connect with our network.
While researching SIM cards, I learned that small apps (“applets”) can be loaded onto the cards and executed separately from the phone’s processor and OS. Recently at DEF CON 21 I gave a presentation with Karl Koscher about our experience working with the SIM cards, detailing how to write, build, load, and use these applets.
Lots more information at simhacks.github.io.