Serving Random Payloads with Apache mod_rewrite Logo

Serving Random Payloads with Apache mod_rewrite

0
Free
Updated 11 March 2025
Visit Website

As testers, we sometimes need some good, old-fashioned trial and error to get things working. Phishing is one of the attacks that commonly takes more than one attempt to get payloads and command and control (C2) working properly. This post covers how to help effectively perform payload trial and error by randomly serving payloads from one URL with Apache mod_rewrite. The technique described in this post lends itself more to a penetration test, where email phishing batches may span an entire target company, rather than a red team assessment, where email phishing is highly targeted and payload issues are painstakingly troubleshot manually. Following the steps below, we can configure an Apache redirector, or server directly, to serve a random payload from a predefined list of possible payloads with the RewriteMap - randomized plain text functionality of Apache. Apache’s RewriteMap function allows external programs, such as scripts, databases, or text files to remap requests for Apache to serve. The example commonly used in the official documentation is if a store changes from a URL structure of item-1234 to iPhone-7-white, the web administrators could use Apache to serve up iPhone-7-white when item-1234 is requested without having to change any hard coded links.

FEATURES

SIMILAR TOOLS

Hidden parameters discovery suite

A Python script for creating a cohesive and up-to-date penetration testing framework.

Pentest active directory LAB project for practicing attack techniques.

A DNS rebinding exploitation framework

A subdomain enumeration tool for penetration testers and security researchers.

Charlotte is an undetected C++ shellcode launcher for executing shellcode with stealth.

A proof-of-concept tool that demonstrates automated MFA bypass techniques for Microsoft Outlook through browser automation and request interception.

Ebowla is a tool for generating payloads in Python, GO, and PowerShell with support for Reflective DLLs.

Customize Empire's GET request URIs, user agent, and headers for evading detection and masquerading as other applications.

CyberSecTools logoCyberSecTools

Explore the largest curated directory of cybersecurity tools and resources to enhance your security practices. Find the right solution for your domain.

Operated by:

Mandos Cyber • KVK: 97994448

Netherlands • contact@mandos.io

VAT: NL005301434B12

Copyright © 2025 - All rights reserved