ivg on master
adds a missing module to the OA… (compare)
ivg on master
loads packages before plugins t… (compare)
ivg on master
allows to use bap instead of ba… (compare)
ivg on master
fixes installation from opam (#… (compare)
ivg on master
improves bap-configurator key h… (compare)
(executor-debug "20: afl_inputs/b-desc = #x0000000000000003")
(executor-debug "20: afl_inputs/b[0] = #x28")
(executor-debug "20: afl_inputs/b[1] = #x10")
(executor-debug "20: afl_inputs/b[2] = #xc5")
(executor-debug "20: afl_inputs/b[3] = #x2f")
(executor-debug "20: afl_inputs/b[4] = #x46")
(executor-debug "20: afl_inputs/b[5] = #xe1")
(executor-debug "20: afl_inputs/b[6] = #xf0")
(executor-debug "20: afl_inputs/b[7] = #xda")
(executor-debug "20: afl_inputs/b[8] = #x90")
(executor-debug "20: afl_inputs/b[9] = #xd9")
(executor-debug "20: afl_inputs/b[0xA] = #x5c")
(executor-debug "20: afl_inputs/b[0xB] = #xd7")
(executor-debug "20: afl_inputs/b[0xC] = #x00")
(executor-debug "20: afl_inputs/b[0xD] = #x00")
(executor-debug "20: afl_inputs/b[0xE] = #x00")
(executor-debug "20: afl_inputs/b[0x1C] = #x00")
(executor-debug "20: afl_inputs/b[0x1D] = #x00")
(executor-debug "20: afl_inputs/b[0x1E] = #x00")
(executor-debug "20: afl_inputs/b[0x1F] = #x00")
(executor-debug "20: afl_inputs/b[0x20] = #x00")
(executor-debug "20: afl_inputs/b[0x21] = #x00")
(executor-debug "20: afl_inputs/b[0x22] = #x00")
(executor-debug "20: afl_inputs/b[0x23] = #x00")
(executor-debug "20: afl_inputs/b[0x24] = #x00")
(executor-debug "20: afl_inputs/b[0x25] = #x00")
(executor-debug "20: afl_inputs/b[0x26] = #x00")
(executor-debug "20: afl_inputs/b[0x27] = #x00")
(executor-debug "20: afl_inputs/b[0x2A] = #x0a")
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
int main(int argc, char **argv){
char buf[45];
FILE *input;
(input = fopen("afl_inputs/b", "r"));
fgets(buf, sizeof(buf), input);
unsigned int gen_hash = 0;
unsigned int i = 0;
const char* str = buf;
for (i = 0; i < 40 && *str; ++str, ++i){
gen_hash = (*str) + (gen_hash << 6) + (gen_hash << 16) - gen_hash;
}
unsigned int orig_hash = 445305947;
if(orig_hash == gen_hash){
puts("access granted");
*(int*)0=0;
}
return 0;
}
Still, it is of importance that I find the correct value that granted us access. Preferably 445305947 not necessarily the pre-image.
But this is the correct answer!
printf "\x28\x10\xc5\x2f\x46\xe1\xf0\xda\x90\xd9\x5c\xd7\x00\n" > afl_inputs/b
$ ./example
access granted
Segmentation fault (core dumped)
1250: c7 45 ac 5b d4 8a 1a movl $0x1a8ad45b, -0x54(%rbp)
1257: 8b 45 ac movl -0x54(%rbp), %eax
125a: 3b 45 a4 cmpl -0x5c(%rbp), %eax
125d: 75 17 jne 0x17 # 1276
here 0x1a8ad45b
is your 445305947
because in this case we did not now at initially to increase.. so there is no cutoff and timeout that fits all binaries right?
The bigger the better. The more cutoff the more time you will spend on the same branch (but you will progress forward slower), the more timeout the more complex formulas you will be able to solve, but you will again progress slower. So if you have an infinite amount of time you can put both to infinity.
(executor-debug "46: Forked a new machine")
(executor-debug "46: SAT")
(executor-debug "46: &-desc = #xffffffffffffffff")
(executor-debug "46: *-desc = #xffffffffffffffff")
(executor-debug "46: \\\b-desc = #xffffffffffffffff")
(executor-debug "46: \\\
\n-desc = #xffffffffffffffff")
(executor-debug "46: \\\014-desc = #xffffffffffffffff")
(executor-debug "46: \\ -desc = #xffffffffffffffff")
(executor-debug "46: \\\127ELF\\\002\\\001\\\001-desc = #x0000000000000003")
(executor-debug "46: \\\127ELF\\\002\\\001\\\001-size = #x0000000000000000")
(executor-debug "46: \\\135-desc = #xffffffffffffffff")
(executor-debug "46: \\\136-desc = #xffffffffffffffff")
(executor-debug "46: \\\137-desc = #xffffffffffffffff")
(executor-debug "46: \\\148-desc = #xffffffffffffffff")
(executor-debug "46: \\\149-desc = #xffffffffffffffff")
(executor-debug "46: \\\152-desc = #xffffffffffffffff")
(executor-debug "46: \\\161-desc = #xffffffffffffffff")
(executor-debug "46: \\\167-desc = #xffffffffffffffff")
(executor-debug "46: \\\173-desc = #xffffffffffffffff")
(executor-debug "46: \\\177-desc = #xffffffffffffffff")
(executor-debug "46: \\\184-desc = #xffffffffffffffff")
(executor-debug "46: \\\185-desc = #xffffffffffffffff")
(executor-debug "46: \\\188-desc = #xffffffffffffffff")
(executor-debug "46: \\\197-desc = #xffffffffffffffff")
(executor-debug "46: \\\226-desc = #xffffffffffffffff")
(executor-debug "46: \\\231-desc = #xffffffffffffffff")
(executor-debug "46: \\\236-desc = #xffffffffffffffff")
(executor-debug "46: \\\237-desc = #xffffffffffffffff")
(executor-debug "46: \\\239-desc = #xffffffffffffffff")
(executor-debug "46: \\\240-desc = #xffffffffffffffff")
(executor-debug "46: \\\243-desc = #xffffffffffffffff")
(executor-debug "46: ]-desc = #xffffffffffffffff")
(executor-debug "46: _-desc = #xffffffffffffffff")
(executor-debug "46: _8-desc = #xffffffffffffffff")
(executor-debug "46: A-desc = #xffffffffffffffff")
(executor-debug "46: E-desc = #xffffffffffffffff")
(executor-debug "46: f-desc = #xffffffffffffffff")
(executor-debug "46: M-desc = #xffffffffffffffff")
(executor-debug "46: S-desc = #xffffffffffffffff")
(executor-debug "46: t-desc = #xffffffffffffffff")
(executor-debug "46: u-desc = #xffffffffffffffff")
(executor-debug "46: Z-desc = #xffffffffffffffff")
(executor-debug "46: mem[0x40C9] = #x01")
(executor-debug "46: mem[0x40CA] = #x01")
(executor-debug "46: mem[0x40CB] = #x01")
(executor-debug "46: mem[0x40CC] = #x01")
(executor-debug "46: mem[0x40CD] = #x01")
(executor-debug "46: mem[0x40CE] = #x01")
Yesterday it was:
for (i = 0; i < 40 && *str; ++str, ++i){
gen_hash = (*str) + (gen_hash << 6) + (gen_hash << 16) - gen_hash;
}
Now it is:
for (i = 0; i < len && *str; ++str, ++i){
gen_hash = (*str) + (gen_hash << 6) + (gen_hash << 16) - gen_hash;
}
The len variable is determined when a file is opened based upon what contents that file has
Possibly I am rusty after some time of having not read those papers. I didn't know you weren't at CMU anymore.
I am familiar with your paper and tagless final style and the Theory documentation. I suppose I haven't exercised Theory as much as I have a lot of the rest of the BAP API. So, although I see it, I don't see it in use. Let's say you were familiar with a particular car part. Well, in that case, you could know what could be done with it from what it's functionality is. Theory seems really general with many use cases, so it's not quite like a specific car part. I just wasn't sure what your exact use case was.
getline(buf,len,stdin)
getline(buf,len,stdin)
to the program.
Hi, I've been using BAP to analyse Windows binaries as follows:
bap ./binary.dll -dbir --optimization-level=3
After upgrading to BAP 2.5.0 yesterday (late to the game I know) I get the following error:
Failed to build the project: attribute "llvm:symbol-entry" didn't provide a
value for the field "value"
This is definitely new :(
For reference this is the output of file binary.dll
binary.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
getline
maybe there is no API and stub for it: https://github.com/BinaryAnalysisPlatform/bap/blob/master/plugins/api/api/c/posix.h
~/.opam/<my-switch>/share/bap/api/c/
getline
using Primus Lisp
--primus-print-observations=linker-unresolved
and see if it does that when it tries to call getline