Skip to content

Commit

Permalink
Merge pull request #416 from e2002e/master
Browse files Browse the repository at this point in the history
No analytics
  • Loading branch information
matthiasseemoo committed Jun 23, 2020
2 parents e66289c + a115e9c commit 6cd8a2a
Show file tree
Hide file tree
Showing 43 changed files with 82 additions and 527 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -5,6 +5,10 @@ Nexmon is our C-based firmware patching framework for Broadcom/Cypress WiFi chip
that enables you to write your own firmware patches, for example, to enable monitor
mode with radiotap headers and frame injection.

This fork is a clone of nexmon with no analytics, appart from the fact that you will feel less watched, you can install it and run it without the gapps.
Build it yourself, read the manual.
There is a library that won't compile with the rest, you will find it from the error message, and fix it by issuing a 'make' in the appropriate folder somewhere in /app/app/src/main/external/src

Before we started to work on this repository, we developed patches for the Nexus 5 (with bcm4339 WiFi chip) in the [bcm-public](https://github.com/seemoo-lab/bcm-public) repository and those for the Raspberry Pi 3 (with bcm43430a1 WiFi chip) in the [bcm-rpi3](https://github.com/seemoo-lab/bcm-rpi3) repository. To remove the development overhead of maintaining multiple separate repositories, we decided to merge them in this repository and add support for some additional devices. In contrast to the former repositories, here, you can only build the firmware patch without drivers and kernels. The Raspberry Pi 3 makes an exception, as here it is always required to also build the driver.

# Give Feedback
Expand Down
3 changes: 0 additions & 3 deletions app/app/build.gradle
Expand Up @@ -79,7 +79,4 @@ dependencies {
compile 'com.github.johnkil.print:print:1.3.1'
compile 'com.nononsenseapps:filepicker:3.1.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.google.android.gms:play-services-analytics:9.2.0'
}

apply plugin: 'com.google.gms.google-services'
38 changes: 0 additions & 38 deletions app/app/google-services.json

This file was deleted.

16 changes: 1 addition & 15 deletions app/app/src/main/AndroidManifest.xml
Expand Up @@ -70,19 +70,5 @@
<action android:name="de.tu_darmstadt.seemoo.nexmon.ATTACK_INSTANCES" />
</intent-filter>
</receiver>

<!-- Register AnalyticsReceiver and AnalyticsService to support background
dispatching on non-Google Play devices. -->
<receiver android:name="com.google.android.gms.analytics.AnalyticsReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.analytics.ANALYTICS_DISPATCH" />
</intent-filter>
</receiver>
<service android:name="com.google.android.gms.analytics.AnalyticsService"
android:enabled="true"
android:exported="false"/>

</application>

</manifest>
</manifest>
6 changes: 3 additions & 3 deletions app/app/src/main/Makefile
Expand Up @@ -2,7 +2,7 @@ UTILITIES_PATH = ../../../../utilities
PATCHES_PATH = ../../../../patches

all: assets/nexmon assets libs/armeabi

assets: \
assets/nexmon/fw_bcm4330_5_90_100_41_sta.bin \
assets/nexmon/fw_bcm4339_6_37_34_43.bin \
Expand All @@ -20,7 +20,7 @@ assets: \
assets/nexmon/mdk3 \
assets/nexmon/socat \
assets/nexmon/libfakeioctl.so \
FORCE
FORCE

assets/nexmon: FORCE
mkdir -p assets/nexmon/
Expand Down Expand Up @@ -99,4 +99,4 @@ clean: FORCE
FORCE:


.PHONY: all clean
.PHONY: all clean
3 changes: 0 additions & 3 deletions app/app/src/main/external/src/libandroidlogger/Android.mk
@@ -1,8 +1,5 @@


LOCAL_PATH:=$(call my-dir)


include $(CLEAR_VARS)
LOCAL_SRC_FILES:=android-logger.c
LOCAL_MODULE:=libandroidlogger
Expand Down
2 changes: 1 addition & 1 deletion app/app/src/main/external/src/libmyaircrackwep/Makefile
Expand Up @@ -17,7 +17,7 @@ $(UTILITIES_PATH)/libssl/local/armeabi/libssl.a: FORCE

$(UTILITIES_PATH)/libcrypto/local/armeabi/libcrypto.a: FORCE
cd $(UTILITIES_PATH)/libcrypto && make

FORCE:

clean:
Expand Down
Expand Up @@ -51,10 +51,6 @@
import android.view.WindowManager;
import android.widget.Toast;

import com.google.android.gms.analytics.GoogleAnalytics;
import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
Expand All @@ -78,30 +74,6 @@ public class MyApplication extends Application {

public static boolean isAppVisible = false;

private static Tracker mTracker;

public static final int SURVEY_NOTIFICATION_ID = 99999;
private static SpannableStringBuilder installInfo;

/**
* Gets the default {@link Tracker} for this {@link Application}.
* @return tracker
*/
synchronized public static Tracker getDefaultTracker() {
if (mTracker == null) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(getAppContext());
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
mTracker = analytics.newTracker(R.xml.global_tracker);
mTracker.set("&uid", nexmonUID);
mTracker.send(new HitBuilders.EventBuilder()
.setCategory("Device to Client-ID")
.setLabel("Device: " + Build.MODEL + " Client-ID: " + nexmonUID)
.setAction("Tracking started")
.build());
}
return mTracker;
}

private static final String TAG = "PenTestSuite";

private static final String APP_PACKAGE = "de.tu_darmstadt.seemoo.nexmon";
Expand Down Expand Up @@ -584,4 +556,4 @@ public static void toast(String msg) {
Toast.makeText(MyApplication.getAppContext(), msg, Toast.LENGTH_SHORT).show();
} catch(Exception e) {e.printStackTrace();}
}
}
}
Expand Up @@ -18,6 +18,7 @@

package de.tu_darmstadt.seemoo.nexmon.gui;

import android.app.Fragment;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
Expand Down Expand Up @@ -55,7 +56,7 @@
import de.tu_darmstadt.seemoo.nexmon.stations.Station;


public class APfragment extends TrackingFragment implements CurrentChannelListener {
public class APfragment extends Fragment implements CurrentChannelListener {

public static final int UPDATE_LIST = 30;
public static final int UPDATE_LIST_COMPLETE = 31;
Expand Down Expand Up @@ -272,11 +273,6 @@ public void onReceive(Context context, Intent intent) {
contUpdate();
}

@Override
public String getTrackingName() {
return "Screen: Airodump";
}

private void toggleApFinder() {
if (!aPfinderService.isRunning()) {
guiHandler.sendEmptyMessage(CLEAR_LIST);
Expand Down
Expand Up @@ -18,7 +18,6 @@

package de.tu_darmstadt.seemoo.nexmon.gui;


import android.app.Fragment;
import android.content.Intent;
import android.net.Uri;
Expand All @@ -34,7 +33,7 @@
/**
* A simple {@link Fragment} subclass.
*/
public class AboutUsFragment extends TrackingFragment {
public class AboutUsFragment extends Fragment {

private ImageView imgTudLogo;
private ImageView imgSeemooLogo;
Expand Down Expand Up @@ -102,13 +101,6 @@ public void onClick(View v) {
return view;
}



@Override
public String getTrackingName() {
return "Screen: About us";
}

@Override
public void onPause() {
super.onPause();
Expand Down
Expand Up @@ -18,7 +18,6 @@

package de.tu_darmstadt.seemoo.nexmon.gui;


import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
Expand Down Expand Up @@ -61,7 +60,7 @@
* Use the {@link AircrackWepFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class AircrackWepFragment extends TrackingFragment implements Attack.IAttackInstanceUpdate{
public class AircrackWepFragment extends Fragment implements Attack.IAttackInstanceUpdate{


private static final int CHOOSE_FILE = 12;
Expand Down Expand Up @@ -226,11 +225,6 @@ public void onResume() {

}

@Override
public String getTrackingName() {
return "Screen: Aircrack WEP";
}

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Expand Down
Expand Up @@ -18,6 +18,7 @@

package de.tu_darmstadt.seemoo.nexmon.gui;

import android.app.Fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
Expand Down Expand Up @@ -51,7 +52,7 @@
/**
* Created by fabian on 8/25/16.
*/
public class AirdecapFragment extends TrackingFragment {
public class AirdecapFragment extends Fragment {

private static final int SHOW_LOADING = 80;
private static final int DISMISS_LOADING = 81;
Expand Down Expand Up @@ -92,11 +93,6 @@ public void onCreate(Bundle savedInstanceState) {

}

@Override
public String getTrackingName() {
return "Screen: Airdecap";
}

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Expand Down Expand Up @@ -254,7 +250,6 @@ public void run() {
scanStart += scanAmount;
}


guiHandler.sendEmptyMessage(UPDATE_SPINNER);
guiHandler.sendEmptyMessage(DISMISS_LOADING);
}
Expand Down
Expand Up @@ -48,7 +48,7 @@
* Use the {@link AttackInfoFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class AttackInfoFragment extends TrackingFragment {
public class AttackInfoFragment extends Fragment {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_ATTACK = "ATTACK";
Expand Down Expand Up @@ -158,11 +158,6 @@ public void onResume() {

}

@Override
public String getTrackingName() {
return "Screen: AttackInfo";
}

@Override
public void onPause() {
super.onPause();
Expand Down
Expand Up @@ -276,7 +276,6 @@ private void showUpcAttack(AccessPoint ap) {
@Override
public void onClick(View v) {
String attack = (String) v.getTag();

if(!MyApplication.isInjectionAvailable() || !MyApplication.isRawproxyreverseAvailable()) {
switch (attack) {
case Attack.ATTACK_FAKE_AUTH:
Expand Down
Expand Up @@ -9,8 +9,6 @@
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.google.android.gms.analytics.HitBuilders;
import com.google.android.gms.analytics.Tracker;
import com.stericson.RootShell.execution.Command;
import com.stericson.RootTools.RootTools;

Expand Down Expand Up @@ -75,13 +73,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
String selectedChannel = channels[position];
setWlanChannel(selectedChannel);

Tracker tracker = MyApplication.getDefaultTracker();
tracker.send(new HitBuilders.EventBuilder()
.setCategory("Channel")
.setLabel("Channel Selection Dialog")
.setAction("Channel changed")
.build());

dismiss();
}
});
Expand Down

0 comments on commit 6cd8a2a

Please sign in to comment.