Giter Site home page Giter Site logo

lucasxp3 / iossecuritysuitex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nmilcoff/iossecuritysuite

0.0 0.0 0.0 1.63 MB

Xamarin.iOS bindings for https://github.com/securing/IOSSecuritySuite

License: MIT License

Objective-C 84.11% C# 12.00% Swift 3.90%

iossecuritysuitex's Introduction

IOSSecuritySuite

This repository contains Xamarin.iOS bindings for the IOSSecuritySuite swift library.

๐Ÿ”’๐Ÿ“Œ Note: I highly encourage you to install BreachDetector instead, which will allow you to work in a cross platform way.

Build status NuGet


ISS logo

by @_r3ggi

ISS Description

๐ŸŒ iOS Security Suite is an advanced and easy-to-use platform security & anti-tampering library written in pure Swift! If you are developing for iOS and you want to protect your app according to the OWASP MASVS standard, chapter v8, then this library could save you a lot of time. ๐Ÿš€

What ISS detects:

  • Jailbreak (even the iOS 11+ with brand new indicators! ๐Ÿ”ฅ)
  • Attached debugger ๐Ÿ‘จ๐Ÿปโ€๐Ÿš€
  • If an app was run in emulator ๐Ÿ‘ฝ
  • Common reverse engineering tools running on the device ๐Ÿ”ญ

Setup

Download the package from NuGet.

Install-Package IOSSecuritySuite

Update Info.plist

After adding ISS to your project, you will also need to update your main Info.plist. There is a check in jailbreak detection module that uses CanOpenURL() method and requires specyfing URLs that will be queried.

<key>LSApplicationQueriesSchemes</key>
<array>
	<string>cydia</string>
	<string>undecimus</string>
	<string>sileo</string>
	<string>zbra</string>
</array>

How to use

Jailbreak detector module

  • The simplest method returns True/False if you just want to know if the device is jailbroken or jailed
if(Securing.IOSSecuritySuite.AmIJailbroken()) 
{
	// This device is jailbroken
}
else 
{
	// This device is not jailbroken
}

Debbuger detector module

var amIDebugged = Securing.IOSSecuritySuite.AmIDebugged() ? true : false;

Deny debugger at all

Securing.IOSSecuritySuite.denyDebugger();

Emulator detector module

var runInEmulator = Securing.IOSSecuritySuite.AmIRunInEmulator() ? true : false;

Reverse engineering tools detector module

var amIReverseEngineered = Securing.IOSSecuritySuite.AmIReverseEngineered() ? true : false;

Security considerations

Before using this and other platform security checkers you have to understand that:

  • Including this tool in your project is not the only thing you should do in order to improve your app security! You can read a general mobile security whitepaper here.
  • Detecting if a device is jailbroken is done locally on the device. It means that every jailbreak detector may be bypassed (even this)!
  • Swift code is considered to be harder to manipulate dynamically than Objective-C. Since this library was written in pure Swift, the IOSSecuritySuite methods shouldn't be exposed to Objective-C runtime (which makes it more difficult to bypass โœ…). You have to know that attacker is still able to MSHookFunction/MSFindSymbol Swift symbols and dynamically change Swift code execution flow.
  • It's also a good idea to obfuscate the whole project code including this library. See Swiftshield

Contribution โค๏ธ

Yes, please!

Special thanks: ๐Ÿ‘๐Ÿป

  • r3ggi for creating the swift library
  • kubajakowski for pointing out the problem with canOpenURL(_:) method
  • olbartek for code review and pull request
  • benbahrenburg for various ISS improvements
  • fotiDim for adding new file paths to check
  • gcharita for adding the Swift Package Manager support
  • rynaardb for creating the amIJailbrokenWithFailedChecks() method
  • undeaDD for various ISS improvements

License

This binding library is licensed under MIT.

References

While creating this tool I used:

iossecuritysuitex's People

Contributors

nmilcoff avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.