Skip to content

Instantly share code, notes, and snippets.

View jaycyb's full-sized avatar

jay jaycyb

  • Dimension 304-X
View GitHub Profile
@jaycyb
jaycyb / BatchOverflow.sol
Created April 26, 2018 18:01
Simplified reproduction of the BatchOverflow vulnerability (CVE-2018–10299)
pragma solidity ^0.4.15;
contract BatchOverflow {
mapping (address => uint8) balances;
event Transfer(address indexed _from, address indexed _to, uint8 _value);
function transferProxy(address _from, address _to, uint8 _value, uint8 _feeGg) public payable returns (bool){
@jaycyb
jaycyb / install_ansible_1liner.ps1
Created May 19, 2016 09:16
Install Ansible on a Windows machine (requires powershell 3.0+)
Set-ExecutionPolicy RemoteSigned; (New-Object System.Net.WebClient).DownloadFile("https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1", "ConfigureRemotingForAnsible.ps1"); & ./ConfigureRemotingForAnsible.ps1
@jaycyb
jaycyb / install_ansible.ps1
Last active May 20, 2016 02:39
Install Ansible on a Windows machine (requires powershell 3.0+)
#Run as admin
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
Set-ExecutionPolicy RemoteSigned
Write-Output "Downloading Ansible Installation Script"
@jaycyb
jaycyb / iptables-dns-limit.sh
Created February 18, 2016 06:01
Mitigation of vulnerability CVE-2015-7547
#!/bin/bash
# vulnerability CVE-2015-7547
# UDP rule: drops DNS packets > 512 bytes
# TCP rule: limit all replies to 1024 bytes
# http://arstechnica.com/security/2016/02/extremely-severe-bug-leaves-dizzying-number-of-apps-and-devices-vulnerable/
# https://habrahabr.ru/company/pt/blog/277383/#comment_8775611
sudo iptables -N UDP-DNS-LIMIT
sudo iptables -N TCP-DNS-LIMIT