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 RSS Feed from Exploit DB

  • [remote] HTTP/2 2.0 - Denial Of Service (DOS)
  • [webapps] Concrete CMS 9.4.3 - Stored XSS
  • [local] Mbed TLS 3.6.4 - Use-After-Free
  • [webapps] ELEX WooCommerce WordPress Plugin 1.4.3 - SQL Injection
  • [webapps] XWiki Platform 15.10.10 - Metasploit Module for Remote Code Execution (RCE)
  • [webapps] Casdoor 2.55.0 - Cross-Site Request Forgery (CSRF)
  • [webapps] dotCMS 25.07.02-1 - Authenticated Blind SQL Injection
  • [webapps] Tourism Management System 2.0 - Arbitrary Shell Upload
  • [remote] ClipBucket 5.5.2 Build #90 - Server-Side Request Forgery (SSRF)
  • [remote] ClipBucket 5.5.0 - Arbitrary File Upload

RSS RSS Feed from Packetstorm

RSS Rss Feed from Nist

  • CVE-2023-36409
    Microsoft Edge (Chromium-based) Information Disclosure Vulnerability
  • CVE-2023-36769
    Microsoft OneNote Spoofing Vulnerability
  • CVE-2023-47004
    Buffer Overflow vulnerability in Redis RedisGraph v.2.x through v.2.12.8 and fixed in v.2.12.9 allows an attacker to execute arbitrary code via the code logic after valid authentication.
  • CVE-2023-45556
    Cross Site Scripting vulnerability in Mybb Mybb Forums v.1.8.33 allows a local attacker to execute arbitrary code via the theme Name parameter in the theme management component.
  • CVE-2023-5605
    The URL Shortify WordPress plugin through 1.7.8 does not sanitise and escape some of its settings, which could allow high privilege users such as admin to perform Stored Cross-Site Scripting attacks even when the unfiltered_html capability is disallowed (for example in multisite setup)
  • CVE-2023-5601
    The WooCommerce Ninja Forms Product Add-ons WordPress plugin before 1.7.1 does not validate the file to be uploaded, allowing any unauthenticated users to upload arbitrary files to the server, leading to RCE.
  • CVE-2023-5530
    The Ninja Forms Contact Form WordPress plugin before 3.6.34 does not sanitize and escape its label fields, which could allow high privilege users such as admin to perform Stored XSS attacks. Only users with the unfiltered_html capability can perform this, and such users are already allowed to use JS in posts/comments etc however the vendor […]
  • CVE-2023-5771
    Proofpoint Enterprise Protection contains a stored XSS vulnerability in the AdminUI. An unauthenticated attacker can send a specially crafted email with HTML in the subject which triggers XSS when viewing quarantined messages.  This issue affects Proofpoint Enterprise Protection: from 8.20.0 before patch 4796, from 8.18.6 before patch 4795 and all other prior versions.
  • CVE-2023-4930
    The Front End PM WordPress plugin before 11.4.3 does not block listing the contents of the directories where it stores attachments to private messages, allowing unauthenticated visitors to list and download private attachments if the autoindex feature of the web server is enabled.
  • CVE-2023-5228
    The User Registration WordPress plugin before 3.0.4.2 does not sanitize and escape some of its settings, which could allow high-privilege users such as admin to perform Stored Cross-Site Scripting attacks even when the unfiltered_html capability is disallowed (for example in multisite setup).
Proudly powered by WordPress | Theme: micro, developed by DevriX.