Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
EmbedPayloadInPng — Embed a payload inside a PNG file | Kitploit
Tools/GitHubGitHub/maldev-academy/embedpayloadinpng
IDS/IPS EvasionData ExfiltrationSteganographyCryptographyPayload Development
GitHubmaldev-academy/embedpayloadinpng

EmbedPayloadInPng

Embed a payload inside a PNG file

View Repository
37356402 years agoReviewed by Kitploit
Share

EmbedPayloadInPng

Embed a payload within a PNG file by splitting the payload across multiple IDAT sections. Each section is encrypted individually using its own 16-byte key with the RC4 encryption algorithm.

Quick Links

Maldev Academy Home

Maldev Academy Syllabus

Maldev Academy Pricing

Implementation

This repository consists of two implementations:

  • EmbedPayloadInPng.py - Python script to embed an input payload to a specified PNG file.
  • FetchPayloadFromPng - Extract the payload from EmbedPayloadInPng.py's outputted PNG file, and decrypt it using the ExtractDecryptedPayload function.

Usage

  1. Use EmbedPayloadInPng.py to create the embedded payload PNG file:
image

The payload-embedded PNG file Output.png file is the same .PNG file as the original one.

https://github.com/user-attachments/assets/bec6f597-9955-4552-80f7-f484bd5754c3

  1. Copy the MARKED_IDAT_HASH macro definition outputted by EmbedPayloadInPng.py and replace it with the existing one in the FetchPayloadFromPng project here.

Embedded PNG File Structure

As mentioned earlier, EmbedPayloadInPng.py is responsible for embedding the payload file within a PNG one. Below is the structure of a payload-embedded PNG file.

image

Since the maximum size of an IDAT section is 8192 bytes, our payload is chunked to multiple IDAT sections. Each section has a size equivalent to (8192 - 16 [RC4 key length]). Furthermore, The last IDAT section will contain the remaining bytes of the payload.


The following images explain EmbedPayloadInPng.py's output and compare it to the structure of the created PNG file:

  • The output PNG file sections.
image

  • The random IDAT section, which is created to mark the start of our payload. The CRC hash of this section is used in our C code to identify the start of our payload in the PNG file.
image

  • The first payload IDAT section, following our random section (in blue). This image also demonstrates the position of the CRC hash and the size of the randomized IDAT section beforehand (in yellow).
image

  • The CRC hash of the first payload IDAT section, which is located at the end of the section following the encrypted first chunk of our payload.
image

  • The start of the second payload IDAT section.
image
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    867
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    544
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    385
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    302
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    279

Explore all tools

Browse our collection of tools

View all tools →