busyscout

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: MIT Imports: 4 Imported by: 0

README

BusyScout

BusyScout is a utility designed for file upload over telnet, specifically targeting devices such as budget IP cameras that are built with BusyBox and typically lack conventional file transfer capabilities.

Table of Contents

Introduction

This utility aims to enable file uploads to devices where traditional methods are not available, utilizing only telnet as the medium. BusyScout exploits the basic system functionalities to simulate file transfer capabilities in environments where only telnet access is possible.

Usage

There are two ways to get BusyScout:

Quick Way

Download the compiled version for your platform from the Releases section.

Long Way
  1. Install Golang.
  2. Clone this repository.
  3. Build the utility from the source code. Ensure to review the code for security and integrity before compiling.
Example Command
./busyscout ipwiz.zip root:root@192.168.10.18:/tmp

Rationale

Budget IP cameras, particularly from Hikvision, Dahua etc, often use BusyBox and may allow telnet access but not SSH. Other file transfer possibilities like mount, tftp, or nc might be occasionally available, but some cameras restrict all conventional file transfer methods. BusyScout fills this gap by allowing file transfers strictly through telnet.

Method of Transfer

Telnet protocol does not inherently support file transfers. However, an alternative approach involves using the telnet console to invoke the printf function to transmit bytes, which are then redirected into a file using standard Linux commands. Example commands include:

printf "\xDE\xAD\xBE\xEF\x...\xF0" > /tmp/bs.0001.part
printf "\xCA\xFE\x33\xE1\x...\xD3" > /tmp/bs.0002.part
...
cat /tmp/bs.*.part > targetfile 

For efficiency, file transmission is executed in parallel across multiple telnet sessions, and the data is subsequently merged into a single file.

This method was initially described here

Advantages

  • Utilizes only widely available system functions, requiring no external commands or utilities.
  • Capable of transferring files in environments where other methods fail.

Disadvantages

  • Low transfer speed, approximately 2 KB/s locally and potentially less remotely.
  • No data integrity verification such as CRC or other hash functions.

Security Note

The telnet protocol was designed in an era before security was a primary concern. While it may be the only method of interaction in some scenarios, using it comes with inherent risks. Use at your own risk.

License

MIT License

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL