Skip to content

Instantly share code, notes, and snippets.

Dominique RIGHETTO righettod

View GitHub Profile
@righettod
righettod / keychain_data_persistence_mstg_check.py
Created Jul 21, 2020
Python3 script to find common entries in 2 export of a iOS device keychain performed via objection.
View keychain_data_persistence_mstg_check.py
import json
import binascii
import hashlib
import argparse
from tabulate import tabulate
"""
Python3 script to find common entries in 2 export of a iOS device keychain performed via objection.
The objective is to help performing the following test of the OWASP MSTG:
@righettod
righettod / ios-detect-screen-capture-and-screen-recording.swift
Created Jul 17, 2020
Code to detect when a user perform a screen capture or screen recording of an application in order to prevent it when possible
View ios-detect-screen-capture-and-screen-recording.swift
import UIKit
//Inspired from the code below:
//https://github.com/takashings/ScreenCapturedSample/blob/master/ScreenCapturedSample/ForScreenCapturedViewController.swift
//https://www.hackingwithswift.com/example-code/uikit/how-to-detect-when-the-user-takes-a-screenshot
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//Define a listener to handle the case when a screen recording is launched
@righettod
righettod / retirejs_report.py
Last active Jun 12, 2020
Quick script to format the results of a JSON scan report from RetireJS.
View retirejs_report.py
import json
import colorama
import sys
from termcolor import colored
from tabulate import tabulate
'''
Quick script to format the result of a RetireJS JSON report:
retire --outputformat json --outputpath retire.json --js --jspath . --nocache
@righettod
righettod / Android-Utils.md
Last active Jan 2, 2020
Utility PowerShell module when manipulating APK on Windows
View Android-Utils.md

The code has been transformed to the following project

@righettod
righettod / pdf_metadata_cleanup.md
Last active Oct 20, 2019
Java and C# code to cleanup the metadata from a PDF document.
View pdf_metadata_cleanup.md

Code sample

All librairies used are free and open source.

Java

/* 
  See https://pdfbox.apache.org 
  See https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox for released artifacts
@righettod
righettod / clickjacking-payload-template.html
Created Oct 5, 2019
Payload template for Clickjaking attack.
View clickjacking-payload-template.html
<head>
<!-- Big up to https://portswigger.net/web-security/clickjacking labs :) -->
<style>
.target_website {
position:relative;
width:800px;
height:400px;
#Set opacity to 0.5 to see overlay allowing preparation of the attack
#Set opacity to 0.00001 to made the target frame site transparent and bypass some browser protection on opacity like one in chrome for example
#See https://www.w3schools.com/css/css_image_transparency.asp
@righettod
righettod / ws_soap_fuzz.py
Last active Oct 5, 2019
Simple dirty script to fuzz a SOAP request using the BURP Sniper approach using Windows authentication.
View ws_soap_fuzz.py
# Simple dirty script to fuzz a SOAP request using the Burp Sniper approach:
# See https://portswigger.net/burp/documentation/desktop/tools/intruder/positions
# Dependencies:
# pip install lxml requests_ntlm requests tabulate tqdm
import requests
import urllib3
from requests_ntlm import HttpNtlmAuth
from lxml import etree as ET
from tabulate import tabulate
from hashlib import sha1
@righettod
righettod / payloads.txt
Last active Oct 3, 2019
Payloads to try to discover blind SQLi when no error is returned.
View payloads.txt
# The situation is the following:
# Your enter ab in a feature and it return data to you but when your enter ab' it indicate that there is not data found.
#
# So, does it means that there is no SQLi because ab' is well handled OR the error is catched
# and a "not data found message" is returned?
#
# The goal here is to submit a payload that, if interpreted by the SQL DB, will give ab and then data will be returned
# then indicating that there is a SQLi because the payload is interpreted.
ab';#
ab';--
@righettod
righettod / check_cve_state.py
Last active Mar 24, 2019
Script to verify, for a set of CVE, if the MITRE has released them and if a link to the security advisory on the CVE owner site has been added (python 3).
View check_cve_state.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script to verify, for a set of CVE, if the MITRE has released them
and if a link to the security advisory on the CVE owner site has been added.
Dependencies: pip install requests
"""
import requests
import collections
@righettod
righettod / rpc-req.md
Last active Oct 11, 2018
Request template to test XML RPC service exposed from CMS like Drupal, Wordpress...
View rpc-req.md

XML RPC method exposed:

  • system.multicall
  • system.methodSignature
  • system.getCapabilities
  • system.listMethods
  • system.methodHelp

Request template:

<?xml version="1.0"?>
You can’t perform that action at this time.