Skip to content

Instantly share code, notes, and snippets.

@BlackDex
Forked from schmich/termbin-encrypted-data.md
Created February 25, 2020 14:25
Show Gist options
  • Save BlackDex/fd9b4a15745b00aaf1a93b9099db6467 to your computer and use it in GitHub Desktop.
Save BlackDex/fd9b4a15745b00aaf1a93b9099db6467 to your computer and use it in GitHub Desktop.
Sharing encrypted data via termbin.com with only netcat and OpenSSL

Single file

Source

  • cat /foo/bar/file.txt | openssl enc -aes-256-cbc -base64 | nc termbin.com 9999
  • Enter password twice (quickly), note termbin.com URL

Destination

  • curl -s http://termbin.com/{id} | openssl enc -aes-256-cbc -base64 -d > file.txt

Entire directory

Source

  • tar -cz /foo/bar/project | openssl enc -aes-256-cbc -base64 | nc termbin.com 9999
  • Enter password twice (quickly), note termbin.com URL

Destination

  • curl -s http://termbin.com/{id} | openssl enc -aes-256-cbc -base64 -d | tar -xz
  • Payload will be extracted to project directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment