- Joined
- Nov 26, 2020
- Messages
- 714
You've probably heard that almost anything can be turned into a spy device, including cables for charging devices. In this article, I will show you how to build a GSM bug on Arduino and program it, which you can call from a specific number and listen to everything that happens. We will disguise our invention as a portable battery.
WARNING
The author of the article and the editorial Board do not call for illegal activities. The information in this article is provided solely for educational purposes. We warn you that illegal traffic in technical means and violation of privacy are punishable in accordance with articles 137 and 138.1 of the criminal code of the Russian Federation.
Officially, only companies that have state licenses can produce equipment for covert wiretapping, video surveillance, and removing information from a computer. According to the plan, these firms should fulfill only state orders. But anyone can get easier spy devices. You can make them yourself if you know how to handle a soldering iron. Parts for such devices are easy to buy at any electronics store.
There are several types of surveillance devices:
THE CHOICE OF DISGUISE
The easiest way is to hide something in the most visible place, in something that does not attract attention. Here are some interesting ways to mask a listening device.
Computer mouse with built-in GSM bug
Charging for a smartphone with a built-in GSM bug
Keyboard with built-in voice recorder
These wiretapping options are also interesting because the items that were bugged are almost always connected to the network: so the bug will never be discharged, which means that it will perform its function longer - to transmit information.
If the bug will only work on its own battery, you will have to think about how to recharge it. In spy movies, this always causes additional problems. We don't need it.
Therefore, my option is to introduce a bug in the external battery for charging the smartphone. It is often carried around, charged, and if not charged, it becomes a power source for the bug itself. For my taste, this is a very good place to place a bug.
BUILD
To build the device, we will need:
Accessories for Assembly
To correctly assemble the device, you need to know the pin assignments on the GSM Sim 800 and Arduino Pro mini modules.
SIM 800 pin assignment
Pin assignment for Arduino Pro mini
Next, we solder the antenna to the GSM module in the socket NET.
Build for the test
After sealing all the components in their places, you need to make sure that the sealing is correct - flash the controller.
Code:
// Connect the library for the software implementation of the UART protocol exchange
#include <SoftwareSerial.h>
SoftwareSerial SIM800 (7, 6); // RX, TX
// Set a variable to store the module response
String _response = "";
void setup () {
// The speed of data exchange with the computer
Serial.begin (19200);
// The speed of data exchange with the modem
SIM800.begin (19200);
Serial.println ("Start!");
// Send AT to set the baud rate
sendATCommand ("AT", true);
// Commands for configuring the modem at every start
// Turn on caller ID
_response = sendATCommand ("AT + CLIP = 1", true);
// Option with DTMF
// _ response = sendATCommand ("AT + DDET = 1", true);
}
String sendATCommand (String cmd, bool waiting) {
// Set a variable to store the result
String _resp = "";
// Duplicate the command to the port monitor
Serial.println (cmd);
// Send a command to the module
SIM800.println (cmd);
// If you need to wait for a response, wait for the response to be sent
if (waiting) {
_resp = waitResponse ();
// If Echo Mode is off (ATE0), then these three lines can be commented out
if (_resp.startsWith (cmd)) {
_resp = _resp.substring (_resp.indexOf ("\ r", cmd.length ()) + 2);
}
// Duplicate the response to the port monitor
Serial.println (_resp);
}
// Return the result. Empty if problem
return _resp;
}
// Function of waiting for a response and returning the result
String waitResponse () {
// Variable to store the result
String _resp = "";
// Variable to track the timeout (10 seconds)
long _timeout = millis () + 10000;
// Wait 10 seconds for a response and check the response or timeout
while (! SIM800.available () && millis () <_timeout) {};
// If there is something to read, read and remember
if (SIM800.available ()) {
_resp = SIM800.readString ();
}
// If a timeout has come, we notify about it and return the result
else {
Serial.println ("Timeout ...");
}
return _resp;
}
void loop () {
// If the modem sent something, we get a response for analysis
if (SIM800.available ()) {
_response = waitResponse ();
// Remove extra spaces at the beginning and end and print the answer to the port monitor
_response.trim ();
Serial.println (_response);
// White list of phones, you can specify several of them separated by commas
String whiteListPhones = "+380713337866";
// If there is an incoming call, check if there is information about identifying the number. If yes, then phoneindex> -1
if (_response.startsWith ("RING")) {
int phoneindex = _response.indexOf ("+ CLIP: \" ");
// Variable for storing a specific number
String innerPhone = "";
// If the information was found, parse the line and get the number
if (phoneindex> = 0) {
phoneindex + = 8;
innerPhone = _response.substring (phoneindex, _response.indexOf ("\" ", phoneindex));
// Print the number to the port monitor
Serial.println ("Number:" + innerPhone);
}
// Check that the length of the number is more than six digits
// and the number was in the list. If yes, then we answer the call,
// if not, then reject
if (innerPhone.length ()> = 7 && whiteListPhones.indexOf (innerPhone)> = 0) {
sendATCommand ("ATA", true);
}
else {
sendATCommand ("ATH", true);
}
}
}
// Wait for Serial commands and send the received command to the modem
if (Serial.available ()) {
SIM800.write (Serial.read ());
};
}
With proper sealing and firmware, our bug will only respond to incoming calls from authorized mobile numbers specified in the firmware when power is applied.
Now it's time to remove the long connecting wires, solder the LEDs from the Arduino Board. We heat-shrink the microphone, drill a hole for it in the external battery case, and attach it and two boards to hot glue, instead of one 18650 battery.
In my build, I used two batteries, but you can use three-there will be enough space.
Final sealing of components
Fitting and fixing the filling in the case
Ready-made device
So, we assembled a GSM bug in the case of an external battery. It may not be perfect, but there are several ways to improve it.
CONCLUSIONS
So, we designed and assembled a GSM bug disguised as an external battery. Its cost is much lower than that of bugs that can be purchased online and in specialized stores. You can repeat my device or modify it. The main thing is to remember that private life is inviolable, and do not use your knowledge for bad purposes!
WARNING
The author of the article and the editorial Board do not call for illegal activities. The information in this article is provided solely for educational purposes. We warn you that illegal traffic in technical means and violation of privacy are punishable in accordance with articles 137 and 138.1 of the criminal code of the Russian Federation.
Officially, only companies that have state licenses can produce equipment for covert wiretapping, video surveillance, and removing information from a computer. According to the plan, these firms should fulfill only state orders. But anyone can get easier spy devices. You can make them yourself if you know how to handle a soldering iron. Parts for such devices are easy to buy at any electronics store.
There are several types of surveillance devices:
- radio bugs;
- mini voice recorders;
- hidden video cameras;
- laser wiretapping.
THE CHOICE OF DISGUISE
The easiest way is to hide something in the most visible place, in something that does not attract attention. Here are some interesting ways to mask a listening device.

Computer mouse with built-in GSM bug

Charging for a smartphone with a built-in GSM bug

Keyboard with built-in voice recorder
These wiretapping options are also interesting because the items that were bugged are almost always connected to the network: so the bug will never be discharged, which means that it will perform its function longer - to transmit information.
If the bug will only work on its own battery, you will have to think about how to recharge it. In spy movies, this always causes additional problems. We don't need it.
Therefore, my option is to introduce a bug in the external battery for charging the smartphone. It is often carried around, charged, and if not charged, it becomes a power source for the bug itself. For my taste, this is a very good place to place a bug.
BUILD
To build the device, we will need:
- GSM module Sim 800;
- Arduino Pro mini;
- Power Bank case for four Li-ion 18650 batteries;
- two or three 18650 form factor batteries (I used two);
- microphone;
- SIM card.

Accessories for Assembly
To correctly assemble the device, you need to know the pin assignments on the GSM Sim 800 and Arduino Pro mini modules.

SIM 800 pin assignment

Pin assignment for Arduino Pro mini
Next, we solder the antenna to the GSM module in the socket NET.
- To the exits MIC+ and MIC - we solder the microphone.
- RXD and TXD on the GSM module to the sixth and seventh pins on the Arduino.
- Solder Vcc and GND from the module to the Arduino and to the contacts on the external battery.

Build for the test
After sealing all the components in their places, you need to make sure that the sealing is correct - flash the controller.
Code:
// Connect the library for the software implementation of the UART protocol exchange
#include <SoftwareSerial.h>
SoftwareSerial SIM800 (7, 6); // RX, TX
// Set a variable to store the module response
String _response = "";
void setup () {
// The speed of data exchange with the computer
Serial.begin (19200);
// The speed of data exchange with the modem
SIM800.begin (19200);
Serial.println ("Start!");
// Send AT to set the baud rate
sendATCommand ("AT", true);
// Commands for configuring the modem at every start
// Turn on caller ID
_response = sendATCommand ("AT + CLIP = 1", true);
// Option with DTMF
// _ response = sendATCommand ("AT + DDET = 1", true);
}
String sendATCommand (String cmd, bool waiting) {
// Set a variable to store the result
String _resp = "";
// Duplicate the command to the port monitor
Serial.println (cmd);
// Send a command to the module
SIM800.println (cmd);
// If you need to wait for a response, wait for the response to be sent
if (waiting) {
_resp = waitResponse ();
// If Echo Mode is off (ATE0), then these three lines can be commented out
if (_resp.startsWith (cmd)) {
_resp = _resp.substring (_resp.indexOf ("\ r", cmd.length ()) + 2);
}
// Duplicate the response to the port monitor
Serial.println (_resp);
}
// Return the result. Empty if problem
return _resp;
}
// Function of waiting for a response and returning the result
String waitResponse () {
// Variable to store the result
String _resp = "";
// Variable to track the timeout (10 seconds)
long _timeout = millis () + 10000;
// Wait 10 seconds for a response and check the response or timeout
while (! SIM800.available () && millis () <_timeout) {};
// If there is something to read, read and remember
if (SIM800.available ()) {
_resp = SIM800.readString ();
}
// If a timeout has come, we notify about it and return the result
else {
Serial.println ("Timeout ...");
}
return _resp;
}
void loop () {
// If the modem sent something, we get a response for analysis
if (SIM800.available ()) {
_response = waitResponse ();
// Remove extra spaces at the beginning and end and print the answer to the port monitor
_response.trim ();
Serial.println (_response);
// White list of phones, you can specify several of them separated by commas
String whiteListPhones = "+380713337866";
// If there is an incoming call, check if there is information about identifying the number. If yes, then phoneindex> -1
if (_response.startsWith ("RING")) {
int phoneindex = _response.indexOf ("+ CLIP: \" ");
// Variable for storing a specific number
String innerPhone = "";
// If the information was found, parse the line and get the number
if (phoneindex> = 0) {
phoneindex + = 8;
innerPhone = _response.substring (phoneindex, _response.indexOf ("\" ", phoneindex));
// Print the number to the port monitor
Serial.println ("Number:" + innerPhone);
}
// Check that the length of the number is more than six digits
// and the number was in the list. If yes, then we answer the call,
// if not, then reject
if (innerPhone.length ()> = 7 && whiteListPhones.indexOf (innerPhone)> = 0) {
sendATCommand ("ATA", true);
}
else {
sendATCommand ("ATH", true);
}
}
}
// Wait for Serial commands and send the received command to the modem
if (Serial.available ()) {
SIM800.write (Serial.read ());
};
}
With proper sealing and firmware, our bug will only respond to incoming calls from authorized mobile numbers specified in the firmware when power is applied.
Now it's time to remove the long connecting wires, solder the LEDs from the Arduino Board. We heat-shrink the microphone, drill a hole for it in the external battery case, and attach it and two boards to hot glue, instead of one 18650 battery.
In my build, I used two batteries, but you can use three-there will be enough space.

Final sealing of components

Fitting and fixing the filling in the case

Ready-made device
So, we assembled a GSM bug in the case of an external battery. It may not be perfect, but there are several ways to improve it.
- Take a case with a larger battery capacity.
- For greater autonomy, put the GSM module into sleep mode, and when you click on the battery power button, activate wiretapping.
- Send a message to the wiretap owner when the button on the external battery is pressed.
CONCLUSIONS
So, we designed and assembled a GSM bug disguised as an external battery. Its cost is much lower than that of bugs that can be purchased online and in specialized stores. You can repeat my device or modify it. The main thing is to remember that private life is inviolable, and do not use your knowledge for bad purposes!