Skip to content

Instantly share code, notes, and snippets.

Ryan Stortz withzombies

  • New York, NY
Block or report user

Report or block withzombies

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8aa2b4ad68bd3b464772bcbdec4a847f
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
addresses:
- 192.168.88.103/24
gateway4: 192.168.88.1
View instruction_state_info.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@withzombies
withzombies / bnil_graph.py
Last active Jun 3, 2019
BinaryNInja plugin to graph BNIL Instructions (they're tree form)
View bnil_graph.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@withzombies
withzombies / crackaddr_vuln.c
Created Apr 20, 2017
halvar's crackaddr test case
View crackaddr_vuln.c
/*
Copyright (c) 2011, Thomas Dullien
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions
@withzombies
withzombies / StructuredDataView.py
Last active Oct 3, 2018
Apply a structure to an address and access its members in BinaryNinja
View StructuredDataView.py
#!/usr/bin/env python
# Copyright 2017 Ryan Stortz (@withzombies)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
View gist:156dda9f12bec78bfa53a5e1fd3ee40d
$ python binja_memcpy.py /bin/bash
Analyzing /bin/bash
100038024 dst:<entry rsi>
src:<entry rdi>
n:<range: -0x80000000 to 0x7fffffff>
1000380c9 dst:<undetermined>
src:<entry rdi>
n:<range: -0x80000000 to 0x7fffffff>
View type.py
def returnTypedString():
# type: () -> str
return "lol"
def returnUntypedString():
return "aww"
a = returnTypedString()
b = returnUntypedString()
View parsetypes.py
>>> import binaryninja
>>> bv = binaryninja.BinaryViewType["Mach-O"].open("/bin/ls")
>>> bv.update_analysis_and_wait()
>>> t = bv.parse_type_string("int (*lol)(int one, void* two, size_t three)")
>>> t
(<type: int32_t (*)(int32_t one, void* two, uint64_t three)>, 'lol')
>>> ti = t[0]
>>> dir(ti)
['__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'alignment', 'array', 'bool', 'calling_convention', 'can_return', 'const', 'count', 'element_type', 'enumeration', 'enumeration_type', 'float', 'function', 'get_string_after_name', 'get_string_before_name', 'handle', 'has_variable_arguments', 'int', 'modified', 'parameters', 'pointer', 'return_value', 'signed', 'structure', 'structure_type', 'target', 'type_class', 'unknown_type', 'void', 'width']
>>> ti.return_value
@withzombies
withzombies / opendns mitm
Created Oct 21, 2016
opendns is man-in-the-middling me
View opendns mitm
$ dig calendar.google.com @208.67.222.222
; <<>> DiG 9.8.3-P1 <<>> calendar.google.com @208.67.222.222
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19048
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;calendar.google.com. IN A
View except_to_optional.cpp
#include <iostream>
#include <experimental/optional>
#define LIFT(fname) \
[] (auto&&... args) -> decltype (auto) \
{ \
return fname (std::forward <decltype (args)> (args)...); \
}
template<typename Func, typename... Args>
You can’t perform that action at this time.