Giter Club home page Giter Club logo

swift.nv's Introduction

Swift.nV

Swift.nV is a vulnerable iOS "secret keeper" application. It is intended as a security training tool instructing Swift developers on common mobile application vulnerabilities, how they are found, and how to prevent them.

Setup

Swift.nV has currently been tested using:

XCode 9.1
iOS Simulator 
	- iPhone SE/8/8+/X
	- iPad 2/Air/Air 2/Pro
	- up to iOS 11.x
Ruby + Sinatra (for the backend web service)
	Required Ruby Gems:
	- sinatra, dm-core, dm-timestamps, dm-migrations, dm-serializer, bcrypt

Run

- Open up the Swift.nV.xcodeproj using XCode 9.1
- Click the Run icon after selecting one of the iOS Simulator targets
- ** Following if needed if testing network functionality
	- Start the Sinatra backend web service:
		- In the api directory run "bundle install" this will install the needed gems	
		- In the api directory run "ruby api.rb"
		- This service should run on localhost (127.0.0.1) port 4567
**

Use

- Click 'register' on the initial log on screen to setup a user.
- Login with the registered user
- Add secrets

Tutorials

- Located within the API at http://localhost:4567/tutorial

Explore

- View the simulator data storage under:
	- ~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Containers/Data/Application/<Application-ID>/Documents
	- ~/Library/Developer/CoreSimulator/Devices/<Device-ID>/data/Library/Preferences/

Intentional Vulnerabilities

Not all vulnerabilities have associated tutorials. View the tutorial list included at http://localhost:4567/tutorial for a walk through.

- Weak Server Side Controls (M1) - Backend web service is vulnerable to forced browsing.
- Weak Server Side Controls (M1) - Backend web service is vulnerable to authentication bypass.
- Insecure Data Storage (M2) - Core Data stores all items in the local sqlite database.
- Insecure Data Storage (M2) - Username/email address is in the user preferences plist file.
- Insufficient Transport Layer Protection (M3) - No SSL for backend web service.
- Unintended Data Leakage (M4) - No protections of automatic iOS background screenshots.
- Unintended Data Leakage (M4) - Log contains multiple sensitive strings.
- Unintended Data Leakage (M4) - Autocomplete is not enabled on sensitive screens (secret entry).
- Unintended Data Leakage (M4) - Login form is not cleared upone successful login.
- Poor Authorization and Authentication (M5) - Changes to insecure stored data (email address) bypasses authentication.
- Poor Authorization and Authentication (M5) - Same email address can be registered multiple times, allowing a user to view another's secrets.
- Broken Cryptography (M6) - Shared Secret "CryptoKey" is stored within the Environment.plist file.
- Client Side Injection (M7) - multiple locations, including Format String Injection on the login screen.
- Improper Session Handling (M8) - App completely lacks any session tokens or they are unused for interaction with API.

swift.nv's People

Contributors

forced-request avatar mccabe615 avatar nvisium-david-lindner avatar nvisium-john-poulin avatar nvisium-seth-law avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swift.nv's Issues

Swift.nV tutorial and help screens

Create the app tutorial and help screens that enumerates all of the internal vulnerabilities and explains how to find, exploit, and fix them.

Backend Web Service

Create a backend web service for Swift.nV (preferably RESTful service) that provides the following functionality:

  • Register User
  • Authenticate User
  • Store Items
  • Retrieve Items

Registration Fails

The register function in NVRegisterViewController.swift needs
_ = NSURLConnection(request: request, delegate: self, startImmediately: true)
right after the request is set up. Must have been deleted accidentally.

Regarding com.nvisium.Swift-nV.plist

After login into swift.nv application i cant able to find out the "com.nvisium.Swift-nV.plist" file inside ~/Library/Developer/CoreSimulator/Devices/ /data/library/Preferences

Could you please help me out

Thanks in advance
Mahesh

Create View Secrets

Screen to display all of the stored secrets from the local sqlite/coredata database

Migrate to Swift 3

Swift 2.3 is deprecated. When you compile the project it complains and asks us to convert to swift 3.

Unable to login after user registration

  1. I started local server using #ruby api.rb
  2. Started the app and all url's in plist are localhost.
  3. I'm able to register on app.
  4. However I'm to login into app using registered details.
    I've attached screenshots for same.
    nv1
    nv2

API comm status

Noticed that if running the app without the API it continues showing the "registering..." message indicator (which is truncated.) It should, however, display a message similar to Communication to API: localhost:4567 has timedout to alert users of the presence of an API, if they aren't aware.

Add photo as a secret

Create the screens and functionality to take a picture or select a current photo and store it as a secret.

API SSL Deployment

Need to write instructions for this, and build code for certificate pinning

Network client functionality

Create network communication functionality to talk to backend Swift.nV web service and perform the following:

  • Register User
  • Authenticate User
  • Store Items
  • Retrieve Items

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.