cstram
Published © GPL3+

APAN - Arduino Privacy Automatic Navigator

What to confuse your ISP and have some privacy? Install APAN in your private network!

BeginnerFull instructions provided4,806
APAN - Arduino Privacy Automatic Navigator

Things used in this project

Hardware components

Arduino Nano 33 IoT
Arduino Nano 33 IoT
×1
Oled 128x32 display
×1

Story

Read more

Schematics

APAN - Arduino Privacy Automatic Navigator

The Arduino Privacy Automatic Navigator is a free tool created with the intent to confuse the ISP.

APAN for 8266

Code

APAN - Arduino Privacy Automatic Navigator

Arduino
The Arduino Privacy Automatic Navigator is a free tool created with the intent to confuse the ISP.
/*
Carlo Stramaglia 28 August 2021
https://www.youtube.com/c/CarloStramaglia

Arduino
Privacy
Automatic
Navigator

APAN
The Arduino Privacy Automatic Navigator is a free tool created with the intent to confuse the ISP.
When you setup the Arduino Privacy Automatic Navigator in your local network, the system will start 
browsing towards sites that have nothing to do with your lifestyle. To be more precise, it will 
connect to your network with a random host name and will search for a random keyword on google all 
day long. Will also navigate while you are not at home so that the ISP will log the presence of people 
in the house while you are on holiday. This will be done massively in order to confuse the ISP and 
have wrong data.

IMPORTANT: YOU NEED TO PUT YOUR WIFI SSID AND PASSWORD in the arduino_secrets.h file
*/


#include <SPI.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h" // update the file with your network data
#include <U8x8lib.h>

// Settings for Display
U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);

///////please enter your sensitive data in the Secret tab/arduino_secrets.h
char ssid[] = SECRET_SSID;        // your network SSID (name)
char pass[] = SECRET_PASS;    // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0;            // your network key index number (needed only for WEP)

int status = WL_IDLE_STATUS;
char server[] = "www.google.com";    // name address for Google (using DNS)

// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
WiFiClient client;

// Variables for the random hostname and search keyword
char word1[12];
char hostn[12];
char webcom[80];
unsigned long t=0;

// Reset PIN
const int OUTPUT_PIN = 2;

void setup() {
  // Setup the PIN for the reset at the end of the sketch
  digitalWrite(OUTPUT_PIN, HIGH);
  pinMode(OUTPUT_PIN, OUTPUT);

  // Display setup
  u8x8.begin();
  u8x8.setPowerSave(0);
  u8x8.setFont(u8x8_font_chroma48medium8_r);

  //Initialize serial and wait for port to open:
  Serial.begin(9600);
//  while (!Serial) {
//    ; // wait for serial port to connect. Needed for native USB port only
//  }
  // Welcome message
  u8x8.drawString(0,0,"WELCOME TO APAN");
  u8x8.drawString(0,1,"---------------");
  u8x8.drawString(0,3," STARTING NOW  ");

  // Create a random hostname
  delay(3000);
  srand(millis());
  rword(hostn);
  Serial.print("The random hostname is: ");
  Serial.println(hostn);
  u8x8.drawString(0,0,"The Hostname is:");
  u8x8.drawString(0,1,"---------------");
  u8x8.drawString(0,3,"                ");
  u8x8.drawString(0,3,hostn);
  WiFi.setHostname(hostn);
 
  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
  }

  String fv = WiFi.firmwareVersion();
  if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
    Serial.println("Please upgrade the firmware");
  }

  // attempt to connect to WiFi network:
  
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }
  // Create a random keyword to search
  srand(millis());
  rword(word1);
  Serial.print("The random word is: ");
  Serial.println(word1);
  u8x8.drawString(0,0,"The Keyword is: ");
  u8x8.drawString(0,1,"-------------- ");
  u8x8.drawString(0,3,"                ");
  u8x8.drawString(0,3,word1);
  sprintf(webcom,"GET /search?q=%s HTTP/1.1",word1);
  
  Serial.println("Connected to WiFi");
  printWifiStatus();

  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");

    delay (3000);
    // Make a HTTP request:
    client.println(webcom);
    client.println("Host: www.google.com");
    client.println("Connection: close");
    client.println();
    
  }
 
}

void loop() {
  // if there are incoming bytes available
  // from the server, read them and print them:
  char datas[1];
  Serial.println("START PROCESSING DATA");
  u8x8.drawString(0,0,"PROCESSING DATA ");
  u8x8.drawString(0,1,"--------------- ");
  u8x8.drawString(0,3,"                ");
  u8x8.setCursor(0, 3);
  Serial.println("START SPRINTF");
  while (client.available()) {
    // Serial.println("CLIENT AVAILABLE");
    char c = client.read();
    sprintf(datas, "%d", c);
    if (t < millis() ) {
      t = millis() + 30;
      u8x8.print(datas);
    }      
    // Serial.write(c); // Uncomment this to see data on the monitor
    // delay(10);
  }
  Serial.println("START WAIT");
  //Wait 15 seconds
  delay (15000);

  Serial.println("START DICONNECTING SERVER");   
  // if the server's disconnected, stop the client:
  if (!client.connected()) {
    Serial.println();
    Serial.println("disconnecting from server.");
    client.stop();
  }

  Serial.println("START RESET");
  // Reset the Arduino
  u8x8.drawString(0,0,"RESETTING BOARD");
  u8x8.drawString(0,1,"--------------- ");
  u8x8.drawString(0,3,"                ");
  delay (3000);
  digitalWrite(OUTPUT_PIN, LOW);

  
}


void printWifiStatus() {
  // print the SSID of the network you're attached to:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());

  // print your board's IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);

  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");

  // print mac address:
  byte mac[6];
  WiFi.macAddress(mac);
  Serial.print("MAC: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
/*
  // print mac address:
  int mac = WiFi.macAddress();
  Serial.print ("MAC Address: ");
  Serial.println(mac);
*/

//  char word[12];
//  char word2[12];
//  int x=0;
//  srand(millis());
//    while (x<50)
//    {
//      rword(word1);
//      rword(word2);
//      cout << word << ' ' << word2 << endl;
//      Serial.println(word1);
//      x++;
//    }

}

void rword (char *word)
{
int len = rand () % 11 + 1;
word [len] = 0;
while (len) word [--len] = 'a' + rand () % 26;
}

 

APAN Include file

Arduino
#define SECRET_SSID "SSID"
#define SECRET_PASS "Password"

APAN for ESP8266

Arduino
/*
Carlo Stramaglia 31 October 2021
https://www.youtube.com/c/CarloStramaglia

Arduino
Privacy
Automatic
Navigator

APAN for ASP8266
The Arduino Privacy Automatic Navigator is a free tool created with the intent to confuse the ISP.
When you setup the Arduino Privacy Automatic Navigator in your local network, the system will start 
browsing towards sites that have nothing to do with your lifestyle. To be more precise, it will 
connect to your network with a random host name and will search for a random keyword on google all 
day long. Will also navigate while you are not at home so that the ISP will log the presence of people 
in the house while you are on holiday. This will be done massively in order to confuse the ISP and 
have wrong data.
*/

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
#include <U8x8lib.h>

// Settings for Display
U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);

ESP8266WiFiMulti WiFiMulti;

// Variables for the random hostname and search keyword
char word1[12];
char hostn[12];
char webcom[80];
unsigned long t=0;

// Reset PIN
const int OUTPUT_PIN = 2;

int status = WL_IDLE_STATUS;
char server[] = "www.google.com"; 

void rword (char *word)
{
int len = rand () % 11 + 1;
word [len] = 0;
while (len) word [--len] = 'a' + rand () % 26;
}



void setup() {

  // Display setup
  u8x8.begin();
  u8x8.setPowerSave(0);
  u8x8.setFont(u8x8_font_chroma48medium8_r);

  //Initialize serial and wait for port to open:
  Serial.begin(115200);

      // Welcome message
  u8x8.drawString(0,0,"WELCOME TO APAN");
  u8x8.drawString(0,1,"---------------");
  u8x8.drawString(0,3," STARTING NOW  ");

  Serial.println();
  Serial.println();
  Serial.println();

  for (uint8_t t = 4; t > 0; t--) {
    Serial.printf("[STARTING] PLEASE WAIT %d...\n", t);
    Serial.flush();
    delay(1000);
  }

  WiFi.mode(WIFI_STA);
  WiFiMulti.addAP("SSID", "Password"); // Put your WiFi credentials here
}

void loop() {
    // Welcome message
  u8x8.drawString(0,0,"WELCOME TO APAN");
  u8x8.drawString(0,1,"---------------");
  u8x8.drawString(0,3," STARTING NOW  ");

  delay (2000);
  
  // Create a random keyword to search
  srand(millis());
  rword(word1);
  Serial.print("The random word is: ");
  Serial.println(word1);
  u8x8.drawString(0,0,"The Keyword is: ");
  u8x8.drawString(0,1,"-------------- ");
  u8x8.drawString(0,3,"                ");
  u8x8.drawString(0,3,word1);

  sprintf(webcom,"GET /search?q=%s HTTP/1.1",word1);


  // attempt to connect to WiFi network:
  if ((WiFiMulti.run() == WL_CONNECTED)) {

    WiFiClient client;

    HTTPClient http;

    Serial.print("[HTTP] begin...\n");
    if (http.begin(client, "http://www.google.com")) {  // HTTP


      Serial.print("[HTTP] GET...\n");
      // start connection and send HTTP header
      int httpCode = http.GET();

      // httpCode will be negative on error
      if (httpCode > 0) {
        // HTTP header has been send and Server response header has been handled
        Serial.printf("[HTTP] GET... code: %d\n", httpCode);

        // file found at server
        if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) {
          // String payload = http.getString();

          // Make a HTTP request:
          client.println(webcom);
          client.println("Host: www.google.com");
          client.println("Connection: close");
          client.println();

          // if there are incoming bytes available
          // from the server, read them and print them:
          char datas[1];
          Serial.println("START PROCESSING DATA");
          u8x8.drawString(0,0,"PROCESSING DATA ");
          u8x8.drawString(0,1,"--------------- ");
          u8x8.drawString(0,3,"                ");
          u8x8.setCursor(0, 3);
          Serial.println("START SPRINTF");
          while (client.available()) {
          // Serial.println("CLIENT AVAILABLE");
          char c = client.read();
          sprintf(datas, "%d", c);
          if (t < millis() ) {
             t = millis() + 30;
             u8x8.print(datas);
            }      
          // Serial.write(c); // Uncomment this to see data on the monitor
           delay(1);
        }
          
          //Serial.println(payload);
        }
      } else {
        Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
      }

      http.end();
    } else {
      Serial.printf("[HTTP} Unable to connect\n");
    }
  }    

  
  Serial.println("START WAIT");
  //Wait 15 seconds
  delay (15000);

  Serial.println("START RESET");
  // Reset the Arduino
  u8x8.drawString(0,0,"RESETTING BOARD");
  u8x8.drawString(0,1,"--------------- ");
  u8x8.drawString(0,3,"                ");
  delay (3000);
  
}

 

APAN ESP8266 without display

Arduino
Version where you do not need a display
/*
Carlo Stramaglia 13 November 2021
https://www.youtube.com/c/CarloStramaglia

Arduino
Privacy
Automatic
Navigator

APAN for ASP8266 and without display
The Arduino Privacy Automatic Navigator is a free tool created with the intent to confuse the ISP.
When you setup the Arduino Privacy Automatic Navigator in your local network, the system will start 
browsing towards sites that have nothing to do with your lifestyle. To be more precise, it will 
connect to your network with a random host name and will search for a random keyword on google all 
day long. Will also navigate while you are not at home so that the ISP will log the presence of people 
in the house while you are on holiday. This will be done massively in order to confuse the ISP and 
have wrong data.
*/

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <WiFiClient.h>
//#include <U8x8lib.h>

// Settings for Display
//U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE);

ESP8266WiFiMulti WiFiMulti;

// Variables for the random hostname and search keyword
char word1[12];
char hostn[12];
char webcom[80];
unsigned long t=0;

// Reset PIN
const int OUTPUT_PIN = 2;

int status = WL_IDLE_STATUS;
char server[] = "www.google.com"; 

void rword (char *word)
{
int len = rand () % 11 + 1;
word [len] = 0;
while (len) word [--len] = 'a' + rand () % 26;
}



void setup() {

  // Display setup
  //u8x8.begin();
  //u8x8.setPowerSave(0);
  //u8x8.setFont(u8x8_font_chroma48medium8_r);

  //Initialize serial and wait for port to open:
  Serial.begin(115200);

      // Welcome message
  //u8x8.drawString(0,0,"WELCOME TO APAN");
  //u8x8.drawString(0,1,"---------------");
  //u8x8.drawString(0,3," STARTING NOW  ");

  Serial.println();
  Serial.println();
  Serial.println();

  for (uint8_t t = 4; t > 0; t--) {
    Serial.printf("[STARTING] PLEASE WAIT %d...\n", t);
    Serial.flush();
    delay(1000);
  }

  WiFi.mode(WIFI_STA);
  WiFiMulti.addAP("SSID", "Password"); // Put your WiFi credentials here
}

void loop() {
    // Welcome message
  //u8x8.drawString(0,0,"WELCOME TO APAN");
  //u8x8.drawString(0,1,"---------------");
  //u8x8.drawString(0,3," STARTING NOW  ");

  delay (2000);
  
  // Create a random keyword to search
  srand(millis());
  rword(word1);
  Serial.print("The random word is: ");
  Serial.println(word1);
  //u8x8.drawString(0,0,"The Keyword is: ");
  //u8x8.drawString(0,1,"-------------- ");
  //u8x8.drawString(0,3,"                ");
  //u8x8.drawString(0,3,word1);

  sprintf(webcom,"GET /search?q=%s HTTP/1.1",word1);


  // attempt to connect to WiFi network:
  if ((WiFiMulti.run() == WL_CONNECTED)) {

    WiFiClient client;

    HTTPClient http;

    Serial.print("[HTTP] begin...\n");
    if (http.begin(client, "http://www.google.com")) {  // HTTP


      Serial.print("[HTTP] GET...\n");
      // start connection and send HTTP header
      int httpCode = http.GET();

      // httpCode will be negative on error
      if (httpCode > 0) {
        // HTTP header has been send and Server response header has been handled
        Serial.printf("[HTTP] GET... code: %d\n", httpCode);

        // file found at server
        if (httpCode == HTTP_CODE_OK || httpCode == HTTP_CODE_MOVED_PERMANENTLY) {
          // String payload = http.getString();

          // Make a HTTP request:
          client.println(webcom);
          client.println("Host: www.google.com");
          client.println("Connection: close");
          client.println();

          // if there are incoming bytes available
          // from the server, read them and print them:
          char datas[1];
          Serial.println("START PROCESSING DATA");
          //u8x8.drawString(0,0,"PROCESSING DATA ");
          //u8x8.drawString(0,1,"--------------- ");
          //u8x8.drawString(0,3,"                ");
          //u8x8.setCursor(0, 3);
          Serial.println("START SPRINTF");
          while (client.available()) {
          // Serial.println("CLIENT AVAILABLE");
          char c = client.read();
          sprintf(datas, "%d", c);
          if (t < millis() ) {
             t = millis() + 30;
             //u8x8.print(datas);
            }      
           Serial.write(c); // Uncomment this to see data on the monitor
           delay(1);
        }
          
          //Serial.println(payload);
        }
      } else {
        Serial.printf("[HTTP] GET... failed, error: %s\n", http.errorToString(httpCode).c_str());
      }

      http.end();
    } else {
      Serial.printf("[HTTP} Unable to connect\n");
    }
  }    

  
  Serial.println("START WAIT");
  //Wait 15 seconds
  delay (15000);

  Serial.println("START RESET");
  // Reset the Arduino
  //u8x8.drawString(0,0,"RESETTING BOARD");
  //u8x8.drawString(0,1,"--------------- ");
  //u8x8.drawString(0,3,"                ");
  delay (3000);
  
}

 

Credits

cstram

cstram

16 projects • 21 followers
Passionate about IT, Electronics and DIY. Strong believer in Raspberry and Arduino devices. Experience in digital television and security.

Comments