Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS Dev - The Dark Side

Wei Wang
February 03, 2017

iOS Dev - The Dark Side

Some basic of Jail-breaking iOS development. Cydia, Cycript, Theos and more.

Wei Wang

February 03, 2017

More Decks by Wei Wang

Other Decks in Programming


  1. It seems that "Dark" is not so good... • Fear

    • Despair • Unpresentable • Negative
  2. iOS Sandbox • Apps live in a sandbox. • No

    interacting with the system.
  3. iOS Sandbox • Apps live in a sandbox. • No

    interacting with the system. • You can only USE your phone as Apple wanted you to. • But never OWN your phone (if you are a geek).
  4. Jailbreak • Root access of iOS file system. • Install

    apps/software unavailable through App Store.
  5. bash> cycript -p LineLive cy> var app = [UIApplication sharedApplication]

    # @"<UIApplication: 0x16530640>" cy> app.delegate # @"<AppDelegate: 0x165384d0>" cy> var appDelegate = new Instance(0x165384d0) # @"<AppDelegate: 0x165384d0>" cy> [appDelegate someMethod]; ...
  6. Demo 3 Theos • Creating a basic tweak. • Makefile

    and modification source. • A real life example of tweak.
  7. cycript • One time. Javascript & Objective-C syntax. • Explore

    & Modify by script on fly. Tweak • Hook & replace. Use the power of Cydia Substrate. • Dynamic framework and ldid (Link Identity Editor) signed.
  8. FAQ

  9. Is jailbreaking legal? • In 2010, 2012, and 2015, the

    U.S. Copyright Office approved. • Not forbidden or threatened by any government or Apple. • Two jailbreakers have been given positions at Apple. • Apple is "stealing" ideas from JB community. And it helps to improve iOS security.
  10. Is jailbreaking legal? But...It's the dark side. • Against EULA.

    • Lose warranty if being jailbroken. (But you can always restore it back into jail.) • So, consider the risk. (or use an old, warranty- exipred device.)
  11. Is it safe to use a jailbroken device? • No,

    unless you use it properly. • Change root password. Do not install anything untrusted. • Jailbreak a clean device. Do not bind Apple ID or store sensitive information. • Do not connect it to company network. • Do no evil. Just use it for study and research.
  12. Why should I know the dark side of iOS? •

    Do you think your app is perfectly safe? • You could use the skills in normal app development. • It's fun!
  13. I am terrified. How could I defend my app from

    dark developers? • Good question as a bright guy! • Learn them and consider your app safety as you are a dark side dev. • And more... (Another story)