Skip to content

krabiswabbie/busyscout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Download the compiled version for your platform from the Releases section OR build the utility from the source code provided.

Command Format

./busyscout <local_file> <remote_target> [--verbose]

The remote target format is: user:pass@host:directory

Example:

# IPv4
busyscout firmware.bin admin:12345@192.168.1.100:/tmp

# IPv6
busyscout firmware.bin admin:12345@[2001:db8::1]:/tmp

# With verbose logging
busyscout firmware.bin admin:12345@192.168.1.100:/tmp --verbose

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, something about 3-5 kB/s is really nice.
  • No data integrity verification such as CRC etc. Only target file size is verified.

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