Skip to content

Instantly share code, notes, and snippets.

View paralax's full-sized avatar

jose nazario paralax

View GitHub Profile
@paralax
paralax / dsl_ac_password_reset.py
Created August 14, 2018 18:22
ASUS Router Password Reset - Routersploit module
import random
import string
from routersploit.core.exploit import *
from routersploit.core.http.http_client import HTTPClient
class Exploit(HTTPClient):
__info__ = {
"name": "ASUS Router Password Reset",
"description": "Module exploits remote flaw in ASUS devices to reset the "
@paralax
paralax / Hhhash.java
Last active July 10, 2023 20:24
Implementation of Hhhash in Java (HTTP Header Hashing)
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.security.MessageDigest;
/*
@paralax
paralax / network_camera_rce.py
Last active March 14, 2023 19:56
routersploit module exploits/cameras/axis/network_camera_rce.py
import random
import re
import string
from routersploit.core.exploit import *
from routersploit.core.http.http_client import HTTPClient
class Exploit(HTTPClient):
__info__ = {
"name": "Axis Network Camera RCE",
@paralax
paralax / com.mylaptop.watchhostconfig.plist
Created January 3, 2023 21:12
OSX plist marrying WatchPaths and Canarytokens to monitor for persistence attempts
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- "https://malware.news/t/20-common-tools-techniques-used-by-macos-threat-actors-malware/46801" -->
<!-- "https://objective-see.org/blog/blog_0x71.html" -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mylaptop.watchhostconfig</string>
<key>ProgramArguments</key>
<array>
@paralax
paralax / dlink_dwr_cred.py
Last active September 8, 2022 15:37
D-Link Router Credential Retrieval
@paralax
paralax / java-deserialization-obfuscation.yara
Created January 27, 2022 19:40
Yara rules to tag artifacts with deserialized and obfuscated code
rule JavaDeswerializePayload
{
meta:
author = "@jnazario"
date = "2022-01-27"
version = 1
strings:
$s1 = "java.lang.Runtime.getRuntime().exec" ascii fullword
$s2 = "javaSerializedData" ascii fullword
@paralax
paralax / dump.sql
Created October 12, 2021 17:42
Backup of website DB 10-12-2021
This file has been truncated, but you can view the full file.
-- MySQL dump 10.13 Distrib 8.0.26, for Linux (x86_64)
--
-- Host: localhost Database: staff
-- ------------------------------------------------------
-- Server version 8.0.26
--
-- Table structure for table `person`
--
@paralax
paralax / README.md
Created September 22, 2021 18:43
Yara rule for Gebriano webshell, affects Asterix servers

Found a request in my HTTP honeypot I couldn't explain. Investigation revealed it's been scanning widely and attempting to exploit a FreePBX command injection vulnerability and install a webshell.

77.247.108.81 - - [21/Sep/2021:18:54:34 -0400] "GET /gbr.php HTTP/1.1" 400 226 "-" "gbrmss/7.29.0" "ct:text/html"

Using this IP I spotted this link which showed me the form data: https://threatwar.com/attackers/695a2a8e-3cb6-4d74-8af8-d5058079a909

Based on the request there this appears to be an RCE injected via the "language" header. Exploit here: https://www.exploit-db.com/exploits/40434

From there I investigated the initial dropper:

@paralax
paralax / README.md
Last active August 3, 2021 03:22
Using Terraform and Docker, demoed with CyberChef

Using Terraform and Docker on OSX

Recently I had to learn myself some Terraform for real, and it hit me - Docker (which I have come to use extensively) would be a perfect environment in which to do this.

Before you begin, make sure you have Terraform installed:

$ brew install terraform

Start the Docker TCP listener

@paralax
paralax / stix_2_1.fsx
Created April 28, 2020 18:07
playing around with stix 2.1 (JSON) in F#
open System.Text
/// https://fsharpforfunandprofit.com/posts/serializating-your-domain-model/
#I "/usr/local/share/dotnet/sdk/NuGetFallbackFolder/newtonsoft.json/9.0.1/lib/net40/"
#r "/usr/local/share/dotnet/sdk/NuGetFallbackFolder/newtonsoft.json/9.0.1/lib/net40/Newtonsoft.Json.dll"
module Json =
open Newtonsoft.Json