Libertyunix
  • About.me
  • Getting Started
    • Kali Images
    • Setting Up Your Kali Box
  • CheetSheets
    • OSCP Fun
    • Active Directory
    • Windows
    • 802-11 Wireless
    • Enumeration
    • Payloads
    • Secure Copy Protocol
    • Privilege Escalation
    • Tunneling
    • Red Team Playbook
    • Oneliners for Code Execution
  • PenTesting & Red Teaming
    • Python for Exfil
    • Using MSBuild to Execute Shellcode in C#
    • Social Engineering Tricks
    • Setting Up Caldera & Atomic Red-Team
    • Discovering & Exploiting Buffer Overflows
  • Wireless
    • An Introduction to IoT Penetration Testing
    • An Introduction to BLE - Part 1
    • BLE Deep Dive
    • Proxmark 3
  • Hack The Box
    • Fuse
    • Blunder
    • Unblanced
    • Tabby
  • Threat Hunting
    • Threat Hunter Playbook
  • DFIR
    • Creating Windows USB for DFIR & Fun (DRAFT)
  • Talks, Workshops, & WriteUps
    • The Portable Executable (PE) (DRAFT)
    • Resume
    • Presented Research
    • Offensive Security 101 Workshop
Powered by GitBook
On this page
  1. PenTesting & Red Teaming

Python for Exfil

Ever looking to get that juicy excel file with all the client data past the blue team?

import base64
import time

data = open("dummy.xls", 'rb').read()
base64_encoded = base64.b64encode(data).decode('UTF-8')
print ("Encoding your data")
print ("Saving to output.txt")
with open("output.txt", "a") as f:
    print(data, file=f) 
time.sleep(2)
print ("ALL DONE!!")
PreviousOneliners for Code ExecutionNextUsing MSBuild to Execute Shellcode in C#

Last updated 4 years ago