Skip to content

Pentesting reports

Notes on penetration testing journeys

PGP: encrypt file content to stdout

Posted on 2019/01/08 - 2019/01/10 by trouble
Pentesting Journeys

Sometimes I don’t simply want to encrypt files, I need to encrypt plain text only, e.g. to send it in the body of an email. I’m using PGP (Pretty Good Privacy) because it’s widely used and it can be installed on Linux, Windows and OSX machines. Well, on *nix machines the program is called GPG (Gnu Privacy Guard) but it’s the only difference. Furthermore, instead of creating To encrypt file content (not the file itself!) use this bash one-line commands:

cat PLAINFILE | gpg -a -o - -r RECIPIENT -e -

It will dump the encrypted content, additionally with ascii armature (option -a or --armor), to stdout (option -o -); therefore no data, altough encrypted, will be ever written on disk. Use this bash one-line command to decrypt pgp’ed data to stdout rather than a file.

Posted in Bash one-linersTagged bash, encrypt, gpg, pgp

Post navigation

PGP: decrypt file contents to stdout
Arbitrary file download: an example

Music from Soundcloud

Pages

  • Manifesto
  • Get in touch

Categories

  • Arbitrary file download
  • Bash one-liners
  • Bypass login
  • PHP snippets

RSS feed: RSS Feed from Exploit DB RSS Feed from Exploit DB

  • [remote] CVE-2026-42167 - ProFTPD mod_sql post-authentication SQLi - RCE
  • [remote] PCMan 2.0.7 - Buffer Overflow
  • [webapps] Linuxfabrik monitoring_plugins_6.0.0 - SSRF
  • [webapps] Nodemailer 9.0.0 - File Read/ SSRF
  • [webapps] flyto-core 2.26.7 - Arbitrary File Write
  • [dos] NanaZip 6.5 - DoS
  • [remote] D-Link DNS_340L - OS Command Injection
  • [remote] ipTIME A3004T - Remote Code Execution
  • [webapps] Duplicati 2.2.0.3 - JWT Signing Key Leak
  • [dos] Nmap 7.99 - Extension Header Integer Underflow

RSS feed: RSS Feed from Packetstorm RSS Feed from Packetstorm

RSS feed: Rss Feed from Nist Rss Feed from Nist

Proudly powered by WordPress | Theme: micro, developed by DevriX.