An unrigorous and unscientific experiment about wireless signal relay

0 23
IntroductionWireless signal relay is generally used to extend the coverage range...

Introduction

Wireless signal relay is generally used to extend the coverage range of wireless signals and enhance signal strength. The goal is to extend the effective distance by receiving wireless signals and retransmitting them to a farther place. Generally, when relaying wireless signals, the relay first receives the signal from the wireless signal source, and the enhanced signal is retransmitted to cover a larger area.
Although wireless signal relay can be easily realized with tools like GNU Radio, this article intends to achieve the relay method in a playful way.
Note: This experiment is for entertainment and appreciation only, as this experiment has not solved the delay problem and cannot guarantee the relay effect. Please read the following text with a non-strict attitude and non-scientific spirit.
The code written for the experiment has been organized intoRF-Relay, do not use it for illegal purposes.
The concept verification of RF-Relay using HackRF devices for relay wireless signal experiments cannot guarantee communication efficiency.
byclient-rxandserver-txThe two programs constitute the theme. Among themclient-rxReceived wireless signals are sent toserver-tx,server-txReceived data is sent out through HackRF.

Cautionary notes

  • Ensureclient-rxandserver-txRunning in a network environment that can be互通, that isserver-txThe IP and port can be accessed byclient-rxAccess, first runserver-txAfter runningserver-tx.

  • An unrigorous and unscientific experiment about wireless signal relay

    Need to use when running the programsudopermissions.

  • Can be modified byclient-rxandserver-txThe frequency parameter of the hackrf command in

Experimental principle

server-tx

  1. server-txAfter the program starts, first parse the command line arguments to get the listening IP and port.

  2. Create a named pipe/tmp/pipetx.ipc, used to store data received from the client.

  3. Start a Goroutine to executehackrf_transferCommand, send the data in the named pipe through the HackRF device.

  4. The main thread opens the named pipe and listens on the specified IP and port.

  5. Accept client connections, read data from the TCP connection, and write it to the named pipe.

client-rx

  1. client-rxAfter the program starts, first parse the command line arguments to get the server's IP and port.

  2. Create a named pipe/tmp/piperx.ipc, used to store data received from HackRF.

  3. Start a Goroutine to executehackrf_transferCommand, receive wireless signals from the HackRF device and write data to the named pipe.

  4. The main thread opens the named pipe and connects to the server.

  5. Data is read from the named pipe and sent to the server through TCP.

client-rxReceived wireless signals are transmitted toserver-txand then retransmit through the HackRF device to achieve signal relay.

Hardware requirements

The following hardware devices are required:

  1. Two PCs or virtual machines: One is used to runclient-rx, another one is used to runserver-tx, need to be in the same network (network interoperability is sufficient).

  2. Two HackRF One devices: Each PC or virtual machine is connected to one, used for receiving and sending wireless signals.

Installation steps

1. Install basic software environment

Install the following basic software on each PC or virtual machine:

  1. Go: Requires installation of Go 1.18 or higher version.

  2. HackRF Tools: Can be installed using the following command:

sudo apt update
sudo apt install hackrf
  1. Git: Used to clone the code repository

sudo apt install git

2. Clone the code

The code repository is stored at:

git clone https://github.com/quark9981/RF-Relay.git

3. Verify HackRF installation

Verify whether the HackRF device on each host or virtual machine is ready.

  1. Check if the HackRF tool is installed

hackrf_info

If the environment is ready, the above command will print the information of the HackRF device separately.

  1. Check HackRF device connection

lsusb

If the environment is ready, the above command will output the interface information of the HackRF device.

4. Start RF-Relay

Build separatelyclient-rxandserver-tx:

Buildclient-rx

cd client-rx
go build -o client-rx main.go

Buildserver-tx

cd server-tx
go build -o server-tx main.go

Use

Startserver-tx

Inserver-txRun the following command in the directory where you are located:

sudo https://www.freebuf.com/articles/wireless/server-tx -i <server-ip> -p <server-port>

For example:

sudo https://www.freebuf.com/articles/wireless/server-tx -i 192.168.1.2 -p 8080

Startclient-rx

Inclient-rxRun the following command in the directory where you are located:

sudo https://www.freebuf.com/articles/wireless/client-rx -i <server-ip> -p <server-port>

For example:

sudo https://www.freebuf.com/articles/wireless/client-rx -i 192.168.1.2 -p 8080

Ensure that the two PCs are on the same network.

5. Test

If everything is normalclient-rxandserver-txOK output will be displayed later.

  • client-rxAfter the relay is completed, the output similar to the following is displayed:

RX OK
  • server-txAfter the relay is completed, the output similar to the following is displayed:

TX OK

6. Data

The experimental topology is as follows
拓扑图-1.png

During the experiment, two HACKRF One tools were connected to two virtual machines respectively, and the running effect is shown in the figure below
f1362bee9e93a8324de93da4c93a51c.png

To confirm whether the signal relay is completed, the experiment relayed the 433.92MHz band signal data to the 315MHz band (only for demonstration purposes, not strictly accurate).
691e8937c712088ee86d063112d8832.jpg
中继效果如下

2q1oh-zfj6n.gif

实验代码存放位置
https://github.com/quark9981/RF-Relay

你可能想看:

As announced today, Glupteba is a multi-component botnet targeting Windows computers. Google has taken action to disrupt the operation of Glupteba, and we believe this action will have a significant i

Ensure that the ID can be accessed even if it is guessed or cannot be tampered with; the scenario is common in resource convenience and unauthorized vulnerability scenarios. I have found many vulnerab

d) Adopt identification technologies such as passwords, password technologies, biometric technologies, and combinations of two or more to identify users, and at least one identification technology sho

5. Collect exercise results The main person in charge reviews the exercise results, sorts out the separated exercise issues, and allows the red and blue sides to improve as soon as possible. The main

It is possible to perform credible verification on the system boot program, system program, important configuration parameters, and application programs of computing devices based on a credible root,

(3) Is the national secret OTP simply replacing the SHA series hash algorithms with the SM3 algorithm, and becoming the national secret version of HOTP and TOTP according to the adopted dynamic factor

Item 28: T1560.001-2 Compress Data and lock with password for Exfiltration with winrar

A Brief Discussion on Data Security Governance and Hierarchical Classification Implementation

Data security can be said to be a hot topic in recent years, especially with the rapid development of information security technologies such as big data and artificial intelligence, the situation of d

4.5 Main person in charge reviews the simulation results, sorts out the separated simulation issues, and allows the red and blue teams to improve as soon as possible. The main issues are as follows

最后修改时间:
admin
上一篇 2025年03月26日 21:53
下一篇 2025年03月26日 22:16

评论已关闭