- Add your project logo.
- Write a short introduction to the project.
- If you are using badges, add them here.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# build-xnu-4570.1.46.sh | |
# Brandon Azad | |
# | |
# A script showing how to build XNU version 4570.1.46 on MacOS High Sierra | |
# 10.13 with Xcode 9. | |
# | |
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a | |
# backup of this directory first! |
Using KLEE on the DARPA CGC challenge binaries (as ported to Linux/OS X by Trail of Bits) is currently not a fun time. Here are a few of the current obstacles.
I'm working off of KLEE master, built against LLVM 3.4, running on Linux (Ubuntu 16.04). Some of this may be easier or harder on other platforms supported by cb-multios (i.e. OS X and maybe someday Windows).
- KLEE wants a standard
int main(int argc, char *argv[])
. Most of the challenges instead haveint main(void)
instead, and some, perversely, use the first int argument to main to hold the address of the flag page. (Edit: this has been fixed in thewindows_support
branch ofcb-multios
and should make its way into master soon) - The challenge binaries use lots of symbols that conflict with things in libc. For example, many of them define the symbol
stdin
and then implement a FILE* struct themselves. So when trying to link inklee-uclibc.bc
you get symbol clashes. This already has an [
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To build the IDA and HexRays SDK on Mac OS X: | |
1. Unzip the sdk | |
2. Copy the libida.dylib and libida64.dylib (from your IDA install) into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 (these actually might go into bin and not lib...) | |
3. Install libiconv via brew (mine was libiconv.2.4.0.dylib) | |
4. Copy libiconv.2.4.0.dylib into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 and rename it to libiconv.2.2.0.dylib | |
5. Copy the hexrays_sdk | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/include/* idasdk67/include/ | |
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/plugins/* idasdk67/plugins/ | |
6. Edit the plugin makefile to remove qwindow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE: HTTP SSL keys are all in PEM format (base64 encoded) | |
#From PEM format to DER | |
openssl x509 -in $1.crt -out $1.der -outform DER | |
#From DER format to PEM | |
openssl x509 -in $1.der -inform DER -out $1.pem -outform PEM | |
#Transforming RSA key to DER format | |
openssl rsa -in oberon.key -inform PEM -out oberon_key.der -outform DER |