IMSI Catchers and Mobile Security
EAS499Honors-IMSICatchersandMobileSecurity-V18F-1
EAS499Honors-IMSICatchersandMobileSecurity-V18F-1
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
6.3 Data Collection App source code snippet<br />
The Data Collection App was initially written by graduate students involved in researching<br />
cell towers under Professor Nadia Heninger’s guidance. In the spring 2015 semester, this author<br />
worked on debugging the app to allow stable data collection <strong>and</strong> adding functionality to the user<br />
interface, in order to embark on the first round of cell tower data collection in Philadelphia (see<br />
Section 4.5).<br />
Below is a snippet from the DataCollectionActivity.class file of the Data Collection<br />
App, which manages the core function that collects information about cell towers in the vicinity<br />
whenever the mobile phone detects a change in signal strength.<br />
// Check that min required time has elapsed since last data entry<br />
timeElapsed = System.nanoTime() - lastCollectedTime;<br />
if (timeElapsed >= delayNanoSec) {<br />
// Logs time since last data entry<br />
Log.d(COLLECTION, "Proceed - " +<br />
(float) timeElapsed/1000000000 +<br />
" sec since last entry");<br />
// Check that data collection count doesn't exceed maximum before collecting<br />
if (current_count_coll_json_obj < MAX_COLLECTIONS_JSON_OBJECTS) {<br />
StringBuffer display_string = new StringBuffer();<br />
List neighborList = telephonyManager<br />
.getNeighboringCellInfo();<br />
// Check that NeighboringCellInfo list is not empty<br />
if (neighborList != null) {<br />
// Report the number of NeighboringCellInfo objects received<br />
Log.d(COLLECTION, String.valueOf(neighborList.size()) +<br />
" neighboring cells found.");<br />
// Process each NeighboringCellInfo packet<br />
for (int i = 0; i < neighborList.size(); i++) {<br />
NeighboringCellInfo neighboringCellInfo =<br />
(NeighboringCellInfo) neighborList.get(i);<br />
// Print neighboring cell information to screen<br />
display_string.append("CID: "<br />
+ neighboringCellInfo.getCid()<br />
+ " LAC: "<br />
+ neighboringCellInfo.getLac()<br />
+ " PSC: "<br />
+ neighboringCellInfo.getPsc()<br />
+ " RSSI: "<br />
+ neighboringCellInfo.getRssi()<br />
+ "\n\n");<br />
// Record transaction information to cell JSONObject<br />
JSONObject entry = new JSONObject();<br />
try {<br />
// Add cell tower signal information to cell JSONObject<br />
entry.put("cid",<br />
neighboringCellInfo.getCid());<br />
entry.put("lac",<br />
neighboringCellInfo.getLac());<br />
entry.put("psc",<br />
neighboringCellInfo.getPsc());<br />
entry.put("rssi",<br />
neighboringCellInfo.getRssi());<br />
// Add latitude longitude information to cell JSONObject<br />
34