diff --git a/.env b/.env index 785e319d..221aabd2 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -export HACKATHON_NOV_2023=$(git rev-parse --show-toplevel)/../programtargets/Hackathon_November_23 \ No newline at end of file +export HACKATHON_NOV_2023=$(git rev-parse --show-toplevel)/../Hackathon_November_23 \ No newline at end of file diff --git a/demos/nov-2023/Makefile b/demos/nov-2023/Makefile index 3b562119..9d0aa7c2 100644 --- a/demos/nov-2023/Makefile +++ b/demos/nov-2023/Makefile @@ -1,14 +1,14 @@ -.PHONY: target4 target4-self target1-self target3 target3-self +.PHONY: target4-patch1 target4 target4-self target1-self target3 target3-self target4.original.exe: cp "$(HACKATHON_NOV_2023)/Target 4 - Grid IDPS (ARM Cortex M7)/build/Amp_Chal_IDPS_Unpatched.ino.elf" $@ -target4.patched.exe: +target4-master: cp "$(HACKATHON_NOV_2023)/Target 4 - Grid IDPS (ARM Cortex M7)/build/Amp_Chal_IDPS_Patched.ino.elf" $@ -target4.csv: - cp "$(HACKATHON_NOV_2023)/Chal4Amp_Chal_IDPS.ino.elf.sym.csv" $@ - echo "entry1, code:60001429, code:60001429" >> $@ +target4-room_1011_dendy: + cd "$(HACKATHON_NOV_2023)" && git fetch && git checkout room_1011_dendy + cp "$(HACKATHON_NOV_2023)/Target 4 - Grid IDPS (ARM Cortex M7)/Amp_Chal_IDPS_Ghidra_patched_r3.ino.elf" target4.patched.exe target4-self: target4.original.exe target4.csv ../../pate.sh \ @@ -19,14 +19,12 @@ target4-self: target4.original.exe target4.csv -b target4.toml \ -e ContinueAfterRecoverableFailures \ -r AllowEqRescopeFailure \ - -s entry1 \ - -s FUN_00000138 \ - -s FUN_00000f38 \ + -s get_bitchunk \ --original-csv-function-hints target4.csv \ --patched-csv-function-hints target4.csv \ --save-macaw-cfgs target4_CFGs -target4: target4.original.exe target4.patched.exe +target4: target4.original.exe target4.patched.exe target4.csv ../../pate.sh \ --ignore-segments 1 \ --read-only-segments 3 \ @@ -35,15 +33,16 @@ target4: target4.original.exe target4.patched.exe -b target4.toml \ -e ContinueAfterRecoverableFailures \ -r AllowEqRescopeFailure \ - -s entry1 \ - -s FUN_00000138 \ - -s FUN_00000f38 \ - -s FUN_00002178 \ - -s FUN_00000e40 \ + -s get_bitchunk \ --original-csv-function-hints target4.csv \ --patched-csv-function-hints target4.csv \ --save-macaw-cfgs target4_CFGs +target4.diff: target4.original.exe target4.patched.exe + arm-none-eabi-objdump -M force-thumb-mode -d target4.original.exe > target4.original.dump + arm-none-eabi-objdump -M force-thumb-mode -d target4.patched.exe > target4.patched.dump + diff target4.original.dump target4.patched.dump > target4.diff + target1.original.exe: cp "$(HACKATHON_NOV_2023)/Target 1 - NASA Lunar Relay Sat (powerpc)/cpu1/core-cpu1" $@