Git Product home page Git Product logo

aicdm's Introduction

AICD

The Next Generation Android IMSI-Catcher Detector (AICD).

This is the AICD source-code repository, for the forward development branch of AIMSICDL. AICD is an extremely light weight re-implementation of the original AIMSICD design. It's code base is a complete re-write from the original, focusing on a minimalistic UI, functionality, ease of use and perhaps most importantly, portability/flexibility due to its modular design.

AICD collects and analyzes mobile radio data to make you aware of your mobile network security and to warn you about threats like fake base stations and IMSI-catchers, that are now commonly used by both criminals and various over-reaching government agencies. These are used for a range of purposes, from simple user-tracking (location and use) to various sophisticated network attacks such as phone interception, and direct device remote control, using over-the-air (OTA) updates and various Stagefright-like RCE vulnerabilities.

  • Status: WIP
  • Date: 2017-06-19

Design Criteria

  • All app functionality will be clearly and well documented
  • All app functionality will be independently modularized (Data Collectors, Detection tests, Listeners, Services etc.)
  • The app will have a bare-bone, ultra minimalistic structure and UI.
  • Database will use SQLite3 with raw SQL queries only!
  • Detection Tests will be based on SQL queries, unless otherwise necessary
  • Detection Tests will be created independently without affecting rest of the code
  • Detections are primarily instantaneous and secondarily retrospective
  • Quality Assurance/Control for performance and correctness

Development Criteria

  • Minimum API support is 21 (Lollipop)
  • Java 8
  • AICD will offer partial support for non-rooted devices
  • New Kotlin supported development
  • No TABs, only 4 space tab-stops
  • English only app UI (should be trivial)
  • No RTL or i18 language support necessary

Dependencies

  • As few as possible! โ—
  • Kotlin (optional, if any)

Resources

HowTo: [WIP / TBA]

  • Contribute (dev with skills)
  • Contribute (dev as noob)
  • File a useful bug report
  • Build on AS (Linux)
  • Run the app
  • Collect LogCat debug info
  • Post large/long debug outputs
  • Deal with Detections

Useful GitHub Markdown Cheat-sheet


How to build and install AICD

  1. Installation of Android Studio
  2. How to compile parser dependencies
  3. Building and Signing the app (WIP)

Building from Source

Please please consult the Android documentation on how to set up the tools and perform a release build.

app permissions

The following permissions are required to run SnoopSnitch:

[NEED UPDATE!]

  • ACCESS_SUPERUSER: Open Qualcomm diagnosis interface to capture radio data
  • READ_PHONE_STATE,
  • RECEIVE_SMS: Generate mobile network traffic recorded in active tests
  • GET_TASKS: Retrieve state of helper processes interacting with diagnosis interface
  • WAKE_LOCK: Acquire CPU for long-running analysis steps
  • ACCESS_FINE_LOCATION,
  • ACCESS_COARSE_LOCATION: record location of IMSI catchers and security events if configured
  • INTERNET: For performing connection tests and upload debug logs upon request
  • ACCESS_NETWORK_STATE: Postpone tests, up/downloads until network is available

In addition, the app require root privileges, which are only used to access the /dev/diag interface from which the baseband network information is read.


About THIS work:

For all technical questions concerning the detection mechanism and its detailed functionality, please refer to our Wiki and FAQ pages. For development, maintenance and other security affairs, please us an email.


License

  • Copyright (C) 2017 GPLv3 5GSD

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. See COPYING for details.


Known Bugs

For the most recent list of bugs, please refer to the currently open GitHb issues.

For technical bugs, and limitations please refer to the GitHub Wiki article "Bugs and Limitations" (TBA).


EOF

aicdm's People

Contributors

emigenix 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

Watchers

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

aicdm's Issues

FAQ proposals (WIP)

This thread is for proposing new FAQ's.

Please focus on specific questions pertaining to development.
(Avoid general general about what it does and what's LTE etc.)

As this issue progress, they will be added to our Wiki.


Q: What detection methods do you plan to use?

A: The detection methods will essentially be the same as previous project,
but with the greatest difference that they will actually work and be much
easier to implement and understand. The reason for this is that each
detection test (DT-n) will be made as a separate "module" and thus
free-standing. That way it is very easy to implement and test and will
not affect other modules. In addition, it allows us to work in parallel
on several tests and can implement pretty much any method we want. We
are open also for new ideas, not already covered. To be able to make
this happen we have changed the DB structure. Here you can find:

Detection Tests
DB Structure

Q: How are the detections performed?

A: The collector services continuously populate the DB with network measurements.
These measurements are then queried directly by SQL statements inside each test
module, called DT-1, DT-2 to DT-n. Where n is the number of each test.
The results of each query is then used in the analyzer loop and given a detection
score. When the sum of all scores reach a threshold a detection flag raised. That
is, one of the colored antenna symbols are shown as an alert.

Q: How can I help implement a new detection?

A: You first check that the detection doesn't already exist in our
Detection Table list.
If it does exists, you check it's status and related issues and join
the discussion from there, if you have something important to add.
If it does not exists, you first create a new issue
labeled Detection: <what it does>. Here you try to describe in as much
detail you can, how the test works and how it helps detect fake base
stations. You can be as technical as you like, but try to be pedagogic
to allow other programmer understand how it work. Then, unless the test
is of trivial nature (which is very unlikely) we want you to accompany
the issue OP with a picture of a flow-chart describing the test you
propose. Once, we are all confident it will work..

You clone the repo, and under the /detect/ directory, you copy the file
called DT-n_template.java to DT-n.java. Then you go to the analyzer and
add your new test to the test loop, labeled ADD NEW Detection Tests HERE.
Of course you need to check and make sure the n you choose doesn't already
exist in our Detection Table. Once you feel this is working, you make
sure you have thoroughly documented the detection, and preferably accompanied
it with a flow chart picture. Once you got this, you make a PR with your new
code and wait for our wetting and test team to accept or reject the new test.


Root Requirements

Why does this require root, the previous version did not need this?

Developer Commitments

This thread is for developer commitments (only)!

If you are available to help contributing to the NG AICD development, please add a short comment below and what parts of the app you think you could or would like to contribute to.

Here is a short (incomplete) list of app areas to which we need contributors.


Alpha Milestone

Functionality:

  • fix app permissions requests

  • fix and separate SignalStrengths and PhoneState listener functions

  • app background Services (main controller, RfApi, GPS)

    • To ensure the correct life-cycle of services started and stopped with the controller/settings activity.
  • Create data bundle handler for the collector services (to push data from listeners to DB handler)

  • Create the main analyzer loop thread, that iterate through all Detection Tests

  • Create DTn test template

    • consists of SQL query
    • score calculator
    • instant attack detection (flag or BROADCAST?)
    • time-stamp and dt (delta-t) for the time it takes to process the detection
  • Create run test/submit function to be used in analyzer loop:

    • RunDT(Int n);
    • Returns: (String error, Int score, Boolean isAttack, Real TS, Real dt)
    • IF (error=="ok"){...} else {Log.e(TAG, ":DT%n: FAILED with Error: " + error, n);}

SQL:

NOTE: This will be based on raw (Sqlite3) SQL queries only.
No external libraries or pre-fabricated Java plug-ins.

  • Create a DB handler (insert), receiving the collector bundles and populate the DB tables with it. (one way)
  • Create a DB handler (select), that performs the queries and gets the result score from it. (two way)

UI:

  • app controller/settings activity (cleanup of: saving settings, buttons, text)

  • app detailed info activity (from AIMSICD) showing:

  • add DB viewer (from AIMSICD) for:

    • 1. EventLog
    • 2. SmsData, BtsLoc, DBi_phy
    • 3. and some additional VIEWS: TBA

Beta Milestone

MAP:

  • add map activity from AIMSICD to be accessible from Setting Activity:

    • add map only, no points

    • add map points from DBi_ext (import) from local camera (bounding box), no logic, just points

    • add BTS point color-codes using DBe_ext

    • add long press on map, to add that location to the BtsLoc DB table.

    • add long press pop-up to select:

      • Delete: to delete the point
      • Move: to move the point to new location
      • Sector Count: 0,1,2,3,4: to give a visible estimate of the number of sectors

Data Flow Diagram

This is the app Data Flow Diagram, showing how data flows from data collectors to the database and then on to the various components, for analysis, tests and display.


aicdl_flow_13


Database ER Diagram

This is the current Database design structure (ER diagram).


aicd6_er


UPDATES:

  1. DBe_import will be renamed to DBe_ext for externally imported or created data.
  2. The EvenLog fields: LAC, CID, PSC, gpsd_* will be replaced by Dbi_vol.id.
  3. The SmsData fields: rat, lac, cid, gpsd_* will be replaced by Dbi_vol.id.
  4. The defaultlocation table, will be renamed DefLoc.

Source Tree Structure

Here we propose show an idea of how we see the files and directories are organized and connected.

Eventually, there will also be a one-line description of each.
If you have suggestions for new items or a different structure, please post them below.

NOTE:

  1. This post will be regularly updated and eventually added to our Wiki.
  2. This is WIP, and may not yet reflect whats found in the repo.

/collectors/
	RfApi.java
	GPS.java
/defend/
/detect/
	DT1.java	-- 
	DT2.java	--
	...
	DTn.java	-- Empty Template
/map/
	AddBts
/services/
	./main/Analyzer.java
	./sms/
	./sim/
	./ss7/
/ui/
	./activities/
	./drawer/
	./fragments/
	./widget/
/utils/
	./anneal/
	Logger

Main
Settings

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.