Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check source map skipping for concolic execution #193

Merged
merged 11 commits into from
Oct 2, 2023
Merged

Conversation

publicqi
Copy link
Contributor

This PR adds source map checking for concolic execution.

It'll first copy/download the source files to work_dir/sources/[addr]/. Then, for bytecode that maps to multilines will be marked as should-skipped.

Some dev notes:

  1. For local files, --base-path is needed for cli. This may introduce path traversal.
  2. For remote files, path traversal is possible as well if the filename is maliciously crafted.
  3. Current the only skip rule: r"^(library|contract|function)(.|\n)*\}$". Further rules can be added.

@shouc shouc requested a review from 0xAWM September 12, 2023 15:03
@publicqi
Copy link
Contributor Author

publicqi commented Sep 17, 2023

TODO:

  1. Local: if a contract is deployed at an address using xxx.address file, the source map is not parsed
  2. Write tests

@fuzzland-bot
Copy link

Found: 0

Project Name Vulnerability Found Time Taken Log
DYNA_exp.txt ‼️ Crashed -1 Log File
SEAMAN_exp.txt ‼️ Crashed -1 Log File
BIGFI_exp.txt ‼️ Crashed -1 Log File
BEGO_exp.txt ‼️ Crashed -1 Log File
Yyds_exp.txt ‼️ Crashed -1 Log File
AUR_exp.txt ‼️ Crashed -1 Log File
Annex_exp.txt ‼️ Crashed -1 Log File
PLTD_exp.txt ‼️ Crashed -1 Log File
ApeDAO_exp.txt ‼️ Crashed -1 Log File
Axioma_exp.txt ‼️ Crashed -1 Log File
SELLC03_exp.txt ‼️ Crashed -1 Log File
Novo_exp.txt ‼️ Crashed -1 Log File
VerilogCTF.txt ‼️ Crashed -1 Log File
THB_exp.txt ‼️ Crashed -1 Log File
CS_exp.txt ‼️ Crashed -1 Log File
EAC_exp.txt ‼️ Crashed -1 Log File
GSS_exp.txt ‼️ Crashed -1 Log File
SellToken_exp.txt ‼️ Crashed -1 Log File
cftoken_exp.txt ‼️ Crashed -1 Log File
GPT_exp.txt ‼️ Crashed -1 Log File
OLIFE_exp.txt ‼️ Crashed -1 Log File
MintoFinance_exp.txt ‼️ Crashed -1 Log File
MBC_ZZSH_exp.txt ‼️ Crashed -1 Log File
ROI_exp.txt ‼️ Crashed -1 Log File
HEALTH_exp.txt ‼️ Crashed -1 Log File
Shadowfi_exp.txt ‼️ Crashed -1 Log File
Carrot_exp.txt ‼️ Crashed -1 Log File
RFB_exp.txt ‼️ Crashed -1 Log File

@fuzzland-bot
Copy link

Found: 24

Project Name Vulnerability Found Time Taken Log
DYNA_exp.txt ✅ Price Manipulation 0h-0m-40s Log File
SEAMAN_exp.txt ✅ Fund Loss 0h-0m-19s Log File
BIGFI_exp.txt ✅ Price Manipulation 0h-0m-28s Log File
BEGO_exp.txt ✅ Fund Loss 0h-0m-29s Log File
Yyds_exp.txt ✅ Fund Loss 0h-1m-15s Log File
AUR_exp.txt -1 Log File
Annex_exp.txt -1 Log File
PLTD_exp.txt ✅ Price Manipulation 0h-1m-40s Log File
ApeDAO_exp.txt ✅ Price Manipulation 0h-0m-45s Log File
Axioma_exp.txt ✅ Fund Loss 0h-1m-0s Log File
SELLC03_exp.txt ✅ Fund Loss 0h-1m-33s Log File
Novo_exp.txt ✅ Price Manipulation 0h-2m-1s Log File
VerilogCTF.txt ✅ Fund Loss 0h-1m-36s Log File
THB_exp.txt ✅ Fund Loss 0h-0m-24s Log File
CS_exp.txt ✅ Price Manipulation 0h-1m-5s Log File
EAC_exp.txt ✅ Fund Loss 0h-0m-19s Log File
GSS_exp.txt ✅ Price Manipulation 0h-1m-40s Log File
SellToken_exp.txt ✅ Fund Loss 0h-0m-51s Log File
cftoken_exp.txt ✅ Fund Loss 0h-0m-52s Log File
GPT_exp.txt -1 Log File
OLIFE_exp.txt -1 Log File
MintoFinance_exp.txt ✅ Arbitrary Call 0h-0m-39s Log File
MBC_ZZSH_exp.txt ✅ Fund Loss 0h-0m-47s Log File
ROI_exp.txt ✅ Fund Loss 0h-0m-27s Log File
HEALTH_exp.txt ✅ Price Manipulation 0h-0m-32s Log File
Shadowfi_exp.txt ✅ Price Manipulation 0h-1m-55s Log File
Carrot_exp.txt ✅ Arbitrary Call 0h-0m-20s Log File
RFB_exp.txt ✅ Fund Loss 0h-1m-40s Log File

@fuzzland-bot
Copy link

Found: 24

Project Name Vulnerability Found Time Taken Log
DYNA_exp.txt ✅ Price Manipulation 0h-1m-22s Log File
SEAMAN_exp.txt ✅ Fund Loss 0h-0m-15s Log File
BIGFI_exp.txt ✅ Price Manipulation 0h-1m-21s Log File
BEGO_exp.txt ✅ Fund Loss 0h-0m-57s Log File
Yyds_exp.txt ✅ Fund Loss 0h-1m-3s Log File
AUR_exp.txt -1 Log File
Annex_exp.txt -1 Log File
PLTD_exp.txt ✅ Price Manipulation 0h-1m-22s Log File
ApeDAO_exp.txt ✅ Price Manipulation 0h-0m-38s Log File
Axioma_exp.txt ✅ Fund Loss 0h-1m-14s Log File
SELLC03_exp.txt ✅ Fund Loss 0h-1m-50s Log File
Novo_exp.txt ✅ Price Manipulation 0h-1m-28s Log File
VerilogCTF.txt ✅ Fund Loss 0h-1m-3s Log File
THB_exp.txt ✅ Fund Loss 0h-0m-41s Log File
CS_exp.txt ✅ Price Manipulation 0h-1m-25s Log File
EAC_exp.txt -1 Log File
GSS_exp.txt ✅ Price Manipulation 0h-3m-35s Log File
SellToken_exp.txt ✅ Fund Loss 0h-1m-17s Log File
cftoken_exp.txt ✅ Price Manipulation 0h-0m-18s Log File
GPT_exp.txt -1 Log File
OLIFE_exp.txt ✅ Fund Loss 0h-0m-57s Log File
MintoFinance_exp.txt ✅ Arbitrary Call 0h-0m-34s Log File
MBC_ZZSH_exp.txt ✅ Fund Loss 0h-0m-31s Log File
ROI_exp.txt ✅ Fund Loss 0h-0m-28s Log File
HEALTH_exp.txt ✅ Price Manipulation 0h-0m-10s Log File
Shadowfi_exp.txt ✅ Price Manipulation 0h-1m-15s Log File
Carrot_exp.txt ✅ Arbitrary Call 0h-0m-19s Log File
RFB_exp.txt ✅ Fund Loss 0h-0m-53s Log File

@0xAWM 0xAWM merged commit 6c66a07 into master Oct 2, 2023
1 check passed
@0xAWM 0xAWM deleted the concolic_srcmap branch October 2, 2023 06:59
@0xAWM 0xAWM mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants