Skip to content

Instantly share code, notes, and snippets.

View itsecurityco's full-sized avatar

Juan Escobar itsecurityco

View GitHub Profile
@itsecurityco
itsecurityco / plc.py
Last active November 12, 2021 05:30
Main CTF Ekoparty 2021 - PLC
# import socket programming library
# @itsecurityco (Juan)
import socket
# import thread module
from _thread import *
door_closed = b"""
______________
|\ ___________ /|
@itsecurityco
itsecurityco / http_client.rb
Last active September 15, 2021 06:10
Metasploit remote HTTP client template
# https://github.com/rapid7/metasploit-framework/wiki/How-to-Send-an-HTTP-Request-Using-HTTPClient
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
def initialize(info = {})
super(
update_info(
@itsecurityco
itsecurityco / MainActivity.kt
Last active September 7, 2021 23:27
Simple Kotlin application to communicate with a PLC via Modbus
/* @author: Juan Escobar (juan.escobar@dreamlab.net) */
package net.dreamlab.modbuscoils
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.os.StrictMode
import android.util.Log
import android.view.View
import io.ktor.network.selector.*
import io.ktor.network.sockets.*
startup_message off
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]%{w} %l'
# Allow scrollwheel to scroll back the terminal output rather than forwarding it
# to the process (e.g. scroll through bash history or vim output).
termcapinfo xterm* ti@:te@
altscreen on
@itsecurityco
itsecurityco / pep8.sh
Created April 11, 2019 16:36
pep8 example: ./pep8.sh W504
curl -s https://lintlyci.github.io/Flake8Rules/api/rules/$1/ | jq '.links'
@itsecurityco
itsecurityco / nessus_merge.py
Last active August 28, 2018 12:38 — forked from btoews/merger.py
Merging Nessus files (only critical & high vulnerabilities)
#! /usr/bin/env python
# Based off: (mastahyeti/merger.py) https://gist.github.com/mastahyeti/2720173
# Modified: @itsecurityco
import xml.etree.ElementTree as etree
import shutil
import os
# Severify of vulnerability
SEVERITY_INFO = 0
@itsecurityco
itsecurityco / shell_nasm.sh
Created January 28, 2018 05:53
x86 instructions to opcode
#!/bin/bash
# x86 instructions to opcode
# Autor: @itseco
# Usage: ./shell_nasm "Here the shellcode..."
perl -e 'print "'$1'"' > /tmp/shellcode && ndisasm -b 32 /tmp/shellcode && rm -f /tmp/shellcode
@itsecurityco
itsecurityco / cleanshellcodebt5r3.py
Last active January 21, 2018 17:28
This script takes a string generated by msfvenom on bt5r3 via PIPE and will clean the raw shellcode
#!/usr/bin/env python
# Author: @itsecurityco
# This script takes a string generated
# by msfvenom on bt5r3 via PIPE
# and will clean the raw shellcode
import sys
import re
if sys.stdin.isatty():
@itsecurityco
itsecurityco / pushstring.py
Last active January 28, 2018 01:15
This script takes a filename as argument and will produce the opcodes to push this string onto the stack
#!/usr/bin/env python
# Author: @itseco
# This script takes a filename as argument
# and will produce the opcodes
# to push this string onto the stack
# Original file: pvePushString.pl (www.corelan.be)
import sys
if len(sys.argv) < 2:
print " usage: %s \"String to put on stack\"" % sys.argv[0]
@itsecurityco
itsecurityco / writebin.py
Last active January 28, 2018 01:16
This script takes a filename as argument and will write bytes in \x format to the file
#!/usr/bin/env python
# Author: @itseco
# This script takes a filename as argument
# will write bytes in \x format to the file
import sys
handle = open(sys.argv[1], 'w')
buf = "Paste the shellcode here..."
handle.write(buf)
handle.close()