Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ait-aecid/semtech-loratool
This util sends encrypted lorapackets using the semtech udp-protocol to the gateway.
https://github.com/ait-aecid/semtech-loratool
exploit lorawan semtech
Last synced: 1 day ago
JSON representation
This util sends encrypted lorapackets using the semtech udp-protocol to the gateway.
- Host: GitHub
- URL: https://github.com/ait-aecid/semtech-loratool
- Owner: ait-aecid
- License: gpl-3.0
- Created: 2022-08-09T13:36:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-18T10:06:00.000Z (over 2 years ago)
- Last Synced: 2024-12-21T11:12:37.696Z (about 2 months ago)
- Topics: exploit, lorawan, semtech
- Language: Python
- Size: 38.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semtech-loratool
This util sends encrypted lorapackets to the network server using the semtech udp-protocol.# Dependencies
- [impacket](https://github.com/SecureAuthCorp/impacket)
- [adafruit-circuitpython-tinylora](https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa)
- [python-dotenv](https://github.com/theskumar/python-dotenv)# Usage
1. Install the dependencies:
```
pip3 install -r requirements.txt
```
2. Clone the repository
3. Set the required environment variables in the file [src/example.env](https://github.com/ait-aecid/semtech-loratool/blob/main/src/example.env) and rename it to ".env"
4. Execute main.py with command line parameters:```
usage: main.py [-h] [-v] [-d] message fcntpositional arguments:
message message to be sent as a hex string
fcnt current framecountoptional arguments:
-h, --help show help message and exit
-v, --verbosity increase output verbosity
-d, --dryrun generate the UDP message without sending it
```
Example usage:
```
cd src
./main.py "01AB" 123 -v
```The program will then:
1. encrypt the provided message/payload
2. calculate the MIC (Message Integrity Code),
3. construct the PHYPayload,
4. encode it to base64,
5. construct the UDP PUSH_DATA message,
6. send the UDP datagram to the specified IP address and port using UDP. (unless the command line parameter "-d" or "--dryrun" is passed)# Additional Info
- A lot of parameters that can be individually set in PHYPayload or the UDP message have been hardcoded to be equal to observed parameters in our testbed. Future versions of this tool might make this further customizable.
# Resources
- [LoraWAN specification](https://lora-alliance.org/wp-content/uploads/2020/11/lorawantm_specification_-v1.1.pdf)
- Lora-net/[packet_forwarder](https://github.com/Lora-net/packet_forwarder/)