• Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Menu
  • Home
  • Become a Hacker
    • Get Started
    • Hacker Mindset
    • Roadmap
    • Simple Setup – Hacker 101
    • Types of Hackers
    • Recommended Courses
  • Boot People Offline
  • Courses
    • All Hacking Courses
    • Cyber Security School
  • CTF
    • Beginners to Advanced Guide
    • Create your own CTF box
    • Field and Resources Guide
    • Platforms & Wargames
    • Tools Used for Solving CTF
    • Writeups
  • Dark Web
    • Beginners Guide
    • Darknet Markets
    • Darkweb 101 (Anonymity Guide)
    • Dark Web OSINT Tools
    • Hacking Forums
    • Latest News
    • Onion Links
  • Hacker Gadgets
  • Hacking Books
  • Tools Directory
Search
Close
  • Home
  • 2022
  • May
  • 13
  • Heyserial – Programmatically Create Hunting Rules For Deserialization Exploitation With Multiple Keywords, Gadget Chains, Object Types, Encodings, And Rule Types

Heyserial – Programmatically Create Hunting Rules For Deserialization Exploitation With Multiple Keywords, Gadget Chains, Object Types, Encodings, And Rule Types

May 13, 2022 Comments Off on Heyserial – Programmatically Create Hunting Rules For Deserialization Exploitation With Multiple Keywords, Gadget Chains, Object Types, Encodings, And Rule Types
Heyserial - Programmatically Create Hunting Rules For Deserialization Exploitation With Multiple Keywords, Gadget Chains, Object Types, Encodings, And Rule Types cybersecurity ethical hacking hack android hack app hack wordpress hacker news hacking hacking tools for windows keylogger kit kitploit password brute force penetration testing pentest pentest android pentest linux pentest toolkit pentest tools spy tool kit spyware tools

Programmatically create hunting rules for deserialization exploitation with multiple

  • keywords (e.g. cmd.exe)
  • gadget chains (e.g. CommonsCollection)
  • object types (e.g. ViewState, Java, Python Pickle, PHP)
  • encodings (e.g. Base64, raw)
  • rule types (e.g. Snort, Yara)

Disclaimer

Rules generated by this tool are intended for hunting/research purposes and are not designed for high fidelity/blocking purposes.

Please test thoroughly before deploying to any production systems.

The Yara rules are primarily intended for scanning web server logs. Some of the “object prefixes” are only 2 bytes long, so they can make large scans a bit slow. (Translation: please don’t drop them all into VT Retrohunt.)

Usage

Help: python3 heyserial.py -h

Examples:

python3 heyserial.py -c 'ExampleChain::condition1+condition2' -t JavaObj  python3 heyserial.py -k cmd.exe whoami 'This file cannot be run in DOS mode'  python3 heyserial.py -k Process.Start -t NETViewState -e base64 "base64+utf16le"  

Utils

utils/checkyoself.py

This is a tool to automate bulk testing of Snort and Yara rules on a variety of sample files.

Usage: python3 checkyoself.py [-y rules.yara] [-s rules.snort] [-o file_output_prefix] [--matches] [--misses] -d malware.exe malware.pcap

Examples: python3 checkyoself.py -y rules/javaobj -s rules/javaobj -d payloads/javaobj pcaps --misses -o java_misses

utils/generate_payloads.ps1

YSoSerial.NET v1.34 payload generation. Run on Windows from the ./utils directory.

  • Source: https://github.com/pwntester/ysoserial.net
  • License: ysoserial.net_LICENSE.txt

utils/generate_payloads.sh

YSoSerial payload generation. Run on Linux from the ./utils directory.

  • Source: https://github.com/frohoff/ysoserial
  • License: ysoserial_LICENSE.txt

utils/install_snort.sh

Installing Snort on a Debian based system was a bit finnicky for me, so I wrote my install notes here.

Use at your own risk in a VM that you have snapshotted recently.

utils/server.py

Simple Python script that runs an HTTP server on 127.0.0.1:12345 and accepts POST requests.

Handy for generating test PCAPs.

License

Copyright (C) 2021 Alyssa Rahman, Mandiant, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at: [package root]/LICENSE.txt Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributing

Check out the Developers’ guide (DEVELOPERS.md) for more details on extending HeySerial!

Prior Work/Related Resources

Tools

  • Deserialization-Cheat-Sheet – @GrrrDog
  • Ysoserial – @frohoff
  • MarshalSec – @frohoff
  • Ysoserial (forked) – @wh1t3p1g
  • Ysoserial.NET and v2 branch – @pwntester
  • ViewGen – 0xacb
  • Rogue-JNDI – @veracode-research

Vulnerabilities

  • Log4J (CVE-2021-44228)
  • Exchange (CVE-2021-42321)
  • Zoho ManageEngine (CVE-2020-10189)
  • Jira (CVE-2020-36239)
  • Telerik (CVE-2019-18935)
  • C1 CMS (CVE-2019-18211)
  • Jenkins (CVE-2016-9299)
  • What Do WebLogic, WebSphere, JBoss, Jenkins, OpenNMS, and Your Application Have in Common? This Vulnerability. – @breenmachine, FoxGloveSecurity (2015)

Talks and Write-Ups

  • PSA: Log4Shell and the current state of JNDI injection – Moritz Bechler (2021)
  • This is Not a Test: APT41 Initiates Global Intrusion Campaign Using Multiple Exploits – Chris Glyer, Dan Perez, Sarah Jones, Steve Miller (2020)
  • Deep Dive into .NET ViewState deserialization and its exploitation – Swapneil Dash (2019)
  • Exploiting Deserialization in ASP.NET via ViewState – Soroush Dalili (2019)
  • Use of Deserialization in .NET Framework Methods and Classes – Soroush Dalili(2018)
  • Friday the 13th, JSON Attacks – Alvaro Muños and Oleksandr Mirosh (2017)
  • Exploiting .NET Managed DCOM – James Forshaw, Project Zero (2017)
  • Java Unmarshaller Security – Moritz Bechler (2017)
  • Deserialize My Shorts – Chris Frohoff (2016)
  • Pwning Your Java Messaging with Deserialization Vulnerabilities – Matthias Kaiser (2016)
  • Journey from JNDI/LDAP Manipulation to Remote Code Execution Dream Land – Alvaro Muños and Oleksandr Mirosh (2016)
  • Marshalling Pickles – Chris Frohoff and Gabriel Lawrence (2015)
  • Are you my Type? Breaking .NET Through Serialization – James Forshaw (2012)
  • A Spirited Peek into ViewState – Mike Shema (2011)

Author: Alyssa Rahman @ramen0x3f

Created: 2021-10-27

Last Updated: 2021-12-02

Blog: https://www.mandiant.com/resources/hunting-deserialization-exploits

For more details on this tool and the research process behind it, check out our blog!

Download Heyserial

Post navigation

SSOh-No – User Enumeration And Password Spraying Tool For Testing Azure AD
German Allegedly Bought Kilos of Amphetamine on the Darkweb

Related Articles

Jeeves: looking to Time-Based Blind SQLInjection through recon

Jeeves: looking to Time-Based Blind SQLInjection through recon

- Hack Tools
May 25, 2022
Reposaur - The Open Source Compliance Tool For Development Platforms

Reposaur – The Open Source Compliance Tool For Development Platforms

- Hack Tools
May 25, 2022
Tornado - Anonymously Reverse Shell Over Tor Network Using Hidden Services Without Portforwarding

Tornado – Anonymously Reverse Shell Over Tor Network Using Hidden Services Without Portforwarding

- Hack Tools
May 25, 2022
hacker gadgets
hacker phone covers

Recent Posts

Jeeves: looking to Time-Based Blind SQLInjection through recon

Jeeves: looking to Time-Based Blind SQLInjection through recon

May 25, 2022
Reposaur - The Open Source Compliance Tool For Development Platforms

Reposaur – The Open Source Compliance Tool For Development Platforms

May 25, 2022
California Man to Plead Guilty in Murder-For-Hire Case

California Man to Plead Guilty in Murder-For-Hire Case

May 25, 2022
Tornado - Anonymously Reverse Shell Over Tor Network Using Hidden Services Without Portforwarding

Tornado – Anonymously Reverse Shell Over Tor Network Using Hidden Services Without Portforwarding

May 25, 2022
PacketStreamer: high-performance remote packet capture and collection tool

PacketStreamer: high-performance remote packet capture and collection tool

May 24, 2022
Google detects Alien spyware targeting Android users

Google detects Alien spyware targeting Android users

May 24, 2022

Social Media Hacking

SocialPath – Track users across Social Media Platforms

SocialPath – Track users across Social Media Platforms

- Social Media Hacking
October 16, 2019October 16, 2019

SocialPath is a django application for gathering social media intelligence on specific username. It checks for Twitter, Instagram, Facebook, Reddit...

SocialScan – Check Email Address and Username Availability on Online Platforms

SocialScan – Check Email Address and Username Availability on Online Platforms

June 17, 2019
Shellphish – Phishing Tool For 18 Social Media Apps

Shellphish – Phishing Tool For 18 Social Media Apps

June 10, 2019July 27, 2019
WhatsApp Hacking using QRLJacking

WhatsApp Hacking using QRLJacking

May 2, 2019May 19, 2019
How to Hack any Facebook Account with Z-Shadow

How to Hack any Facebook Account with Z-Shadow

April 26, 2019June 29, 2020
hacker buffs
ABOUT US

Haxf4rall is a collective, a good starting point and provides a variety of quality material for cyber security professionals.

Our primary focus revolves around the latest tools released in the Infosec community and provide a platform for developers to showcase their skillset and current projects.

COMPANY
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Menu
  • Contact Us
  • Disclaimer
  • Hacker Gadgets
  • LANC Remastered
  • PCPS IP Puller
  • Privacy Policy
  • Sitemap
  • Submit your Tool
Live Chat
RESOURCES
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Menu
  • Attack Process
  • Become a Hacker
  • Career Pathways
  • Dark Web
  • Hacking Books
  • Practice Your Skills
  • Recommended Courses
  • Simple Setup – Hacker 101
Get Started
TOOLBOX
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Menu
  • Anonymity
  • Bruteforce
  • DoS – Denial of Service
  • Information Gathering
  • Phishing
  • SQL Injection
  • Vulnerability Scanners
  • Wifi Hacking
Tools Directory

2014 – 2020 | Haxf4rall.com               Stay Connected:

Facebook Twitter Google-plus Wordpress
Please wait...

Join Our Community

Subscribe now and get your free HACKERS HANDBOOK

Don't Worry ! You will not be spammed
SIGN UP FOR NEWSLETTER NOW