Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ad9fdb0
Base implementation of reentrancy checker
VincenzoArceri Oct 30, 2024
6ab8c29
Bug fixing and script benchmark for reentrancy checker
merendamattia Oct 30, 2024
b3b5b46
Updated .gitignore
merendamattia Oct 31, 2024
f7c55e9
Added EtherSolve benchmark
merendamattia Oct 31, 2024
0f28b65
Minor changes
merendamattia Oct 31, 2024
00fb374
Update to LiSA 0.1
VincenzoArceri Oct 31, 2024
cf4ed43
Merge branch 'reentrancy-checker' of
VincenzoArceri Oct 31, 2024
18aa1df
Updated tests
merendamattia Oct 31, 2024
c9f6723
Minor changes
merendamattia Oct 31, 2024
72c2092
Added option for using creation code (#24)
merendamattia Oct 31, 2024
4f59999
Updated readme and fixed typo
merendamattia Oct 31, 2024
eafd195
Merge pull request #25 from lisa-analyzer/adding-options
VincenzoArceri Nov 1, 2024
ab8ae21
Refactoring analysis executor
VincenzoArceri Nov 1, 2024
b697442
Refactoring test classes
VincenzoArceri Nov 1, 2024
bcad1b3
Minor changes
merendamattia Nov 1, 2024
bb33b07
Data sorted
merendamattia Nov 2, 2024
85684d5
Added the bytecode used in the final json
merendamattia Nov 3, 2024
8f84275
Fixed bug
merendamattia Nov 3, 2024
c0e4181
Fixed typo
merendamattia Nov 3, 2024
6425925
Fixed bug in ADDRESS operator
merendamattia Nov 3, 2024
26e6176
Reentrancy checker & plot evmlisa results
merendamattia Nov 3, 2024
c70c3e6
Minor changes
merendamattia Nov 3, 2024
787d896
Reentrancy checker
VincenzoArceri Nov 3, 2024
49ff103
Optimization
merendamattia Nov 3, 2024
a79de48
Added vanilla analisys
merendamattia Nov 4, 2024
8cb3c6e
Minor changes
merendamattia Nov 4, 2024
2ff45ec
Refined reentrancy checker
VincenzoArceri Nov 4, 2024
dc91a68
Normalizing path used for cfg name
lucaneg Nov 4, 2024
d43a455
Added etherscan vanilla
merendamattia Nov 4, 2024
7f39359
Reentrancy warning raised just on the last SSTORE opcode of a basic
VincenzoArceri Nov 4, 2024
8a78c2a
Lazy computation of SSTORE nodes
VincenzoArceri Nov 4, 2024
9f49532
Reentrancy checker ran just once
VincenzoArceri Nov 4, 2024
da937d7
Updated solc version to 5.12 from 5.17
merendamattia Nov 4, 2024
6704fb4
Minor changes
merendamattia Nov 4, 2024
91cbba8
Typo
merendamattia Nov 4, 2024
5aaac5e
Refactoring reentrancy checker
VincenzoArceri Nov 5, 2024
afd893c
Refactoring
merendamattia Nov 5, 2024
1e4ad64
Refactoring
merendamattia Nov 5, 2024
2eef85f
Added smartbugs dataset
merendamattia Nov 5, 2024
ba58984
Updated .gitignore
merendamattia Nov 5, 2024
08d6b8d
Added smartbugs data in the graph
merendamattia Nov 5, 2024
98e0074
Refactoring
merendamattia Nov 5, 2024
088cdcb
Changed compile-all
VincenzoArceri Nov 5, 2024
055eff2
Fixed issues: ethersolve statistics dump, resolved compilation proble…
merendamattia Nov 6, 2024
5902568
Removed 31.sol (bug with the compiler)
merendamattia Nov 6, 2024
1da390b
Minor changes
merendamattia Nov 6, 2024
11b477d
Added reentrancy flag option
merendamattia Nov 6, 2024
c2ba8fb
Minor changes
merendamattia Nov 6, 2024
e9b2f5b
Minor changes to reentrancy checker
VincenzoArceri Nov 8, 2024
d1f1b1d
Added junit test for smartbugs dataset
merendamattia Nov 8, 2024
d0af6a9
Added junit test for smartbugs dataset
merendamattia Nov 8, 2024
1bcc058
Added the computation of Precision, Recall and F-measure in python be…
merendamattia Nov 9, 2024
3aa69ca
Minor changes
merendamattia Nov 9, 2024
c7a4be8
Fixed issue (#26)
merendamattia Nov 9, 2024
4472ee6
Fixed typo (#26)
merendamattia Nov 9, 2024
154974f
Added action that checks the docker image build on master branch and …
merendamattia Nov 10, 2024
af0196f
Removed injected bug not appearing in bytecode from solidifi ground t…
merendamattia Nov 11, 2024
33d6699
Removed injected bug not appearing in bytecode from solidifi ground t…
merendamattia Nov 11, 2024
6bd850d
Added SliSE dataset for benchmark
merendamattia Nov 11, 2024
780e9dd
Added junit test for solidifi dataset
merendamattia Nov 11, 2024
12b4c7b
Bug fix
merendamattia Nov 11, 2024
eab38e3
Added SliSE benchmark
merendamattia Nov 12, 2024
33272e2
Minor changes
merendamattia Nov 14, 2024
f3b5fdf
Removed dead code
merendamattia Nov 14, 2024
7decfb0
Major update: optimized tests using multi-threading and cache
merendamattia Nov 15, 2024
9efd993
Added option to link unsound jumps to all jumpdest
VincenzoArceri Nov 18, 2024
c19423a
Added link-unsound-jumps-to-all-jumpdest option in JumpSolver
merendamattia Nov 18, 2024
98a6fa2
Optimization
merendamattia Nov 18, 2024
07400ae
If a jump node is linked to all jump destinations, is not counted as
VincenzoArceri Nov 18, 2024
a68daac
Minor changes
merendamattia Nov 18, 2024
d7aa36e
Merge remote-tracking branch 'refs/remotes/origin/reentrancy-checker'…
merendamattia Nov 18, 2024
95a268a
Recomputation of maybe unsound jumps
VincenzoArceri Nov 19, 2024
02bd558
Merge remote-tracking branch 'refs/remotes/origin/reentrancy-checker'…
merendamattia Nov 19, 2024
b722fc5
Refactoring and code optimization
merendamattia Nov 19, 2024
70ef2b0
Removed SmartBugs test
merendamattia Nov 19, 2024
5066a94
Minor
merendamattia Nov 19, 2024
f2a6722
Minor changes
merendamattia Nov 21, 2024
1b2218b
Refactoring
merendamattia Nov 22, 2024
c91e74b
Refactoring
merendamattia Nov 22, 2024
48fb0c5
Refactoring
merendamattia Nov 22, 2024
c7c7df8
Refactoring
merendamattia Nov 22, 2024
ad2f9ca
Refactored paths to OS-independent
merendamattia Nov 22, 2024
2fcfd02
First draft TxOriginChecker
denisguareschi Nov 27, 2024
7a530be
Refactoring
merendamattia Nov 28, 2024
92f399a
spotlessApply
merendamattia Nov 28, 2024
c5ea083
Added mnemonic option for input file and refactoring
merendamattia Nov 30, 2024
667ebbc
Minor
merendamattia Nov 30, 2024
e3fb983
Minor
merendamattia Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 23 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Docker build image test'

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
docker-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build Docker image
run: docker build -t evmlisa:test .

- name: Remove Docker image
run: docker rmi evmlisa:test
29 changes: 27 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,33 @@
# Ignore output directories that contain generated results
evm-outputs/
test-ground-truth-stats/
evm-testcases/ground-truth/test/logs.txt
evm-testcases/ground-truth/test/statistics.csv
evm-testcases/ground-truth/test-ground-truth-results/logs.txt
evm-testcases/ground-truth/test-ground-truth-results/statistics.csv

# Ignore benchmark results
# SolidiFI reentrancy
scripts/python/journal/reentrancy-solidifi/results/
scripts/python/journal/reentrancy-solidifi/json/
scripts/python/journal/reentrancy-solidifi/bytecode/
scripts/python/journal/vanilla-solidifi/results/
scripts/python/journal/vanilla-solidifi/json/
scripts/python/journal/vanilla-solidifi/bytecode/

# smartbugs reentrancy
scripts/python/journal/reentrancy-smartbugs/results/
scripts/python/journal/reentrancy-smartbugs/json/
scripts/python/journal/reentrancy-smartbugs/bytecode/

# SliSE reentrancy
scripts/python/journal/reentrancy-slise-db1/results/
scripts/python/journal/reentrancy-slise-db1/json/
scripts/python/journal/reentrancy-slise-db1/bytecode/
scripts/python/journal/reentrancy-slise-db1/match-file-index.json

scripts/python/journal/execution/
scripts/python/journal/images/
scripts/python/journal/DAppSCAN/
scripts/python/journal/SliSE/

# Ignore downloaded bytecode
evm-testcases/benchmark/
Expand Down
13 changes: 1 addition & 12 deletions .project
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>evm-lisa</name>
<comment>Project emv-lisa created by Buildship.</comment>
<comment></comment>
<projects>
</projects>
<buildSpec>
Expand All @@ -20,15 +20,4 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
<filteredResources>
<filter>
<id>1698415238879</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,25 @@ This command will initiate the analysis process for the specified smart contract

```
Options:
-a,--address <arg> address of an Ethereum smart contract
-b,--benchmark <arg> filepath of the benchmark suite (i.e., a list of smart contract addresses)
-C,--cores <arg> number of cores to use
-c,--dump-cfg dump the CFG
-d,--dump-analysis <arg> dump the analysis (html, dot)
-D,--download-bytecode download the bytecode, without analyzing it
-f,--filepath <arg> filepath of an EVM bytecode smart contract
-o,--output <arg> output directory path
-q,--stack-size <arg> maximal height of stack
-s,--dump-stats dump statistics
-S,--use-live-storage use the live storage in SLOAD
-w,--stack-set-size <arg> maximal size of stack sets
-a,--address <arg> Address of an Ethereum smart contract.
-b,--benchmark <arg> Filepath of the benchmark.
-c,--cores <arg> Number of cores used in benchmark.
--checker-reentrancy Enable re-entrancy checker.
--checker-txorigin Enable tx-origin checker.
--creation-code Parse bytecode as creation code (instead of runtime code).
--dot Export a dot-notation file.
--download-bytecode Download the bytecode.
--dump-report Dump analysis report.
--dump-stats Dump statistics.
-f,--filepath-bytecode <arg> Filepath of the bytecode file.
--filepath-mnemonic <arg> Filepath of the mnemonic file.
--html Export a graphic HTML report.
--link-unsound-jumps-to-all-jumpdest Link all the unsound jumps to all jumpdest.
-o,--output <arg> Output directory path.
--serialize-inputs Serialize inputs.
--stack-set-size <arg> Dimension of stack-set (default: 8).
--stack-size <arg> Dimension of stack (default: 32).
--use-live-storage Use the live storage in SLOAD.
```

# 🔍 Abstract Stack Set Domain
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ dependencies {
// Apache Commons CLI
implementation 'commons-cli:commons-cli:1.4'

implementation 'io.github.lisa-analyzer:lisa-program:0.1b8'
implementation 'io.github.lisa-analyzer:lisa-analyses:0.1b8'
implementation 'io.github.lisa-analyzer:lisa-sdk:0.1b8'
implementation 'io.github.lisa-analyzer:lisa-imp:0.1b8'
implementation 'io.github.lisa-analyzer:lisa-program:0.1'
implementation 'io.github.lisa-analyzer:lisa-analyses:0.1'
implementation 'io.github.lisa-analyzer:lisa-sdk:0.1'
implementation 'io.github.lisa-analyzer:lisa-imp:0.1'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.5.0'
implementation 'io.github.cdimascio:dotenv-java:3.0.0'

Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/add/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/add"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/addmod/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/addmod"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/and/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/and"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/byte/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/byte"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/div/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/div"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/if/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/if"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/if_else/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/if_else"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/if_else_npbj/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/if_else_npbj"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/lt/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/lt"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/mod/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/mod"
}
Expand Down
1 change: 1 addition & 0 deletions evm-testcases/cfs/mstore/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/mstore"
}
Expand Down

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions evm-testcases/cfs/mstore8/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"serializeInputs" : "false",
"serializeResults" : "true",
"syntacticChecks" : "",
"useWideningPoints" : "false",
"wideningThreshold" : "5",
"workdir" : "evm-outputs/cfs/mstore8"
}
Expand Down
Loading
Loading