From 8364fa25e4f65416f970804071478f5389f7c0b3 Mon Sep 17 00:00:00 2001 From: Diane Dubois Date: Thu, 12 Jan 2023 10:43:48 +0100 Subject: [PATCH] Removed binary files from the repository so template.iso was removed. README.md was edited to capture additional steps to make up for that and the fuzzer-master was edited to fix cases with iso fuzzing without a template file. --- README.md | 2 +- core/fuzzer-master.ps1 | 14 ++++++++++++-- data/template.iso | Bin 65536 -> 0 bytes 3 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 data/template.iso diff --git a/README.md b/README.md index de13726..d865155 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ All arguments are mandatory except the last 5 arguments: - `HostIdaPath` is used to precompute the blocks' addresses on the target binary when no breakpoint list is found. It is though strongly advised to use the utilities to precompute the blocks beforehand and filter out unneeded blocks to keep the list minimal. - The default max mutation rate for input files is 0.3. - `MinInputSize` and `MaxInputSize` set limits for the corpus files. Default values: 100 and 4096. -- `VirtualDiskType` should be set if the fuzzer needs to run on mutated file systems (bi-dimensional fuzzing mode). The type should then be given as an argument: "vfd", "vhd", "iso", or a combination of those values in a list. +- `VirtualDiskType` should be set if the fuzzer needs to run on mutated file systems (bi-dimensional fuzzing mode). The type should then be given as an argument: "vfd", "vhd", "iso", or a combination of those values in a list. If iso is selected, a "template.iso" should be added to data. ### Running the fuzzer diff --git a/core/fuzzer-master.ps1 b/core/fuzzer-master.ps1 index b567174..92ac74c 100644 --- a/core/fuzzer-master.ps1 +++ b/core/fuzzer-master.ps1 @@ -110,15 +110,25 @@ if ($VirtualDiskType) { } $fsGeneratorPath = Join-Path $ScriptPath "fs-generator.ps1" if ($VirtualDiskType.GetType().Name -eq "String") { - Copy-Item "..\data\template.$VirtualDiskType" $fsCorpus $fsTemplate = Join-Path $fsCorpus "template.$VirtualDiskType" + if (Test-Path -Path "..\data\template.$VirtualDiskType") { + Copy-Item "..\data\template.$VirtualDiskType" $fsCorpus + } + else { + New-Item -Path $fsTemplate -Value "Test" -ItemType File -Force > $null + } $fscommand = "-HostOutputDir ""$HostOutputDir"" -VirtualDiskType $VirtualDiskType" $fsGenPid = Start-HelperProcess -script $fsGeneratorPath -commandline $fscommand } else { $fsTemplate = New-Object System.Collections.ArrayList $fscommands = New-Object System.Collections.ArrayList foreach ($format in $VirtualDiskType) { - Copy-Item "..\data\template.$format" $fsCorpus + if (Test-Path -Path "..\data\template.$VirtualDiskType") { + Copy-Item "..\data\template.$format" $fsCorpus + } + else { + New-Item -Path (Join-Path $fsCorpus "template.$format") -Value "Test" -ItemType File -Force > $null + } $fsTemplate.Add((Join-Path $fsCorpus "template.$format")) > $null $fscommand = "-HostOutputDir ""$HostOutputDir"" -VirtualDiskType $format" $fscommands.Add($fscommand) > $null diff --git a/data/template.iso b/data/template.iso deleted file mode 100644 index 70f5472d7ea201dd036362d450da8673df95461d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 65536 zcmeI*T~E_c7y#h6C}fg&V~n30EF|6#gIzb{wb3PBXkua$yd`lLB;zB>h5lduhpsC) z*oNc6LX$m*bUi)1ZO?gj=%HOWL`Vb(5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7dX^6q__c9PiLKkR1htJBHg;CQ%qGPo+@T(Vte&Q|B8v+E=xDVAt7V!izK z`ol@sqawQ%&9bB!jUv;CUw0ngefsirrP#69zb)OWK)#??+-l|i|H-p7>!jVRoA$ET zy z8SZBaW`_Hjf>EcJ2oNAp2Z7(`<9{70qYeZJ5FkK+z>Nsx{ZF4izRmmX8#$Yk5FkK+ z009DZ5J<+Kv3n?4hxbAq2oNAZfB*pk1PBlyK!8A10^>XXW_SQl6|mzHAV7cs0RjXF z5FkK+0D&3^B;&uabNgR|w?Y*N5FkK+009C72oNAZfIwve<2(PB&;Kg}c3=Vo2oNAZ zfB*pk1PBlyPy>PabL?-nCUfjBj7YX)qio5>YPnu5=IMXlIvs6|o-ZW#^8S~+vy*?# zw_~%6*j!mFGHWYEWb@6X$gGGg!@Lq8K!5-N0#yjipJV^>_&;wJ{tFRFZ^8KgAc|?? ze~kWZKqq!auRljiZ^3T@lYO$k`&7|>$0R_2009EaDDYu093CxW!?l?J0RjXFEV01u b(f8rE`|DN+^a4K!t_4eXIb7nwPt)TM-1(=F