Skip to main content

introduction

foreword

In the process of penetration and vulnerability mining of embedded devices, many problems have been encountered. One is that some devices do not have telnetd or ssh services to obtain an interactive shell, and the other is that memory corruption vulnerabilities such as stack overflow are usually Null bytes are truncated, so it is more troublesome to construct reverse_shellcode, so this tool was developed to exploit the vulnerability. This tool is developed based on the PWN module and currently uses the python2 language

fuction

This tool is embedded in the security test of the device. There are two main functions:

  1. Generate backdoor programs of various architectures. The backdoor program is packaged in shellless pure shellcode and is smal in size.Armv5, Armv7, Armv8, mipsel, mips are now supported, and they are still being updated

  2. Generate reverse_shell shellcode of various architectures during the exploit process, and no null bytes, which facilitates the exploitation of memory corruption vulnerabilities on embedded devices. Armv5, Armv7, Armv8, mipsel, mips are now supported, and they are still being updated

Construct ELF

python2 install pwn

pip install pwn

​ This tool is developed in python language, so converting python to ELF can be done through nuitka

nuitka hackEmbedded_tool.py

​ If possible, put the modules that generate various backdoors and reverse_shellcode under python's site-packages

sudo cp ./generate_* {your_dir}/site-packages
sudo cp ./extract_shellcode.py {your_dir}/site-packages

You can view the path in sys.path under the python terminal

Python 2.7.17 (default, Mar 18 2022, 13:21:42) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path

Instructions for use

​ To use the generated backdoor or reverse_shellcode, you need to specify the ip address, port number, assembly architecture, endian (Default is armv7)

​ Here is the example that generates reverse_shellcode without null bytes

hackEmbedded_tool -reverse_ip 192.168.7.1 -reverse_port 444 -arch arm -endian little -exploit_shellcode 1

image-20220428161403858

This is the usage list for generating the backdoor file of the corresponding schema

hackEmbedded_tool -reverse_ip 192.168.7.1 -reverse_port 444 -arch arm -endian little -backdoor_file 1

image-20220428161757170

You can view tool information with -h

image-20220428161847829

chips and architectures

Tests can leverage chips and architectures

Mips: MIPS 74kc V4.12 big endian MIPS 24kc V5.0 little endian

Armv7: Allwinner(全志)V3s

Armv8: Qualcomm Snapdragon 660

One-click build environment

To be added

Metadata

Release files for Embeddedhack 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Embeddedhack 0.0.2
File Size Uploaded Provenance Actions
Embeddedhack-0.0.2.tar.gz 4.3 kB Without provenance Details for Embeddedhack-0.0.2.tar.gz

Release files / Embeddedhack-0.0.2.tar.gz

Download URL Embeddedhack-0.0.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
42ef71bb78459b39a651c14e7255c1ddd372f57232a034f0bd1e18d022ae0847
BLAKE2b-256 checksum
How to use checksums
324e88457fdf727edcb27757bc5bb6a31888737d9b0991185a56fcc5c3c6967f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/2.7.17

Security for Embeddedhack 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page