Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
Zipr Toolchain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
Zipr Toolchain
Commits
c5eab195
Commit
c5eab195
authored
6 years ago
by
Jason Hiser
Browse files
Options
Downloads
Patches
Plain Diff
removed commented-out code.
Former-commit-id: 53bc87610d123067094eedf7f4edceeb964e9f65
parent
146e01b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/ps_analyze.sh
+0
-205
0 additions, 205 deletions
tools/ps_analyze.sh
with
0 additions
and
205 deletions
tools/ps_analyze.sh
+
0
−
205
View file @
c5eab195
...
...
@@ -814,17 +814,6 @@ report_logs()
echo
"#ATTRIBUTE hostname=
$myhost
"
>>
$logfile
echo
"#ATTRIBUTE step_name=all_helix"
>>
$logfile
# for i in $all_logs
# do
# stepname=`basename $i .log`
# echo >> $logfile
# echo ------------------------------------------------------- >> $logfile
# echo ----- From $i ------------------- >> $logfile
# echo ------------------------------------------------------- >> $logfile
# cat $i |sed "s/^# ATTRIBUTE */# ATTRIBUTE ps_$i_/" >> $logfile
# echo ------------------------------------------------------- >> $logfile
# echo >> $logfile
# done
}
...
...
@@ -1128,202 +1117,8 @@ main()
cloneid
=
$varid
# build basic IR
#perform_step fill_in_cfg mandatory libfill_in_cfg.so $cloneid $step_options_fill_in_cfg
#perform_step fill_in_safefr mandatory $SECURITY_TRANSFORMS_HOME/bin/fill_in_safefr.exe $cloneid
#perform_step fill_in_indtargs mandatory $SECURITY_TRANSFORMS_HOME/bin/fill_in_indtargs.exe $cloneid $step_options_fill_in_indtargs
# finally create a clone so we can do some transforms
# perform_step clone pdb_register $SECURITY_TRANSFORMS_HOME/bin/clone.exe $varid clone.id
# is_step_on clone
# if [ $? = 1 ]; then
# cloneid=`cat clone.id`
# #
# # we could skip this check and simplify ps_analyze if we say that cloning is necessary in is_step_error
# #
# if [ -z "$cloneid" -o ! "$cloneid" -gt 0 ]; then
# fail_gracefully "Failed to create variant. Is postgres running properly?"
# fi
# else
# fi
# do the basic tranforms we're performing for peasoup
#perform_step fix_calls mandatory $SECURITY_TRANSFORMS_HOME/bin/fix_calls.exe $cloneid $step_options_fix_calls
# look for strings in the binary
#perform_step find_strings none $SECURITY_TRANSFORMS_HOME/bin/find_strings.exe $cloneid $step_options_find_strings
#
# analyze binary for string signatures
#
#perform_step appfw find_strings $PEASOUP_HOME/tools/do_appfw.sh $arch_bits $newname.ncexe logs/find_strings.log $step_optoins_appfw
#
# protect_pov
#
#perform_step protect_pov fill_in_indtargs $PEASOUP_HOME/tools/do_protect_pov.sh $PWD/a.ncexe $name $PWD/crash.pov.cso $step_options_protect_pov
#if [ -f crash.pov.cso ]; then
# step_options_watch_allocate="$step_options_watch_allocate --warning_file=crash.pov.cso"
#fi
#
# check signatures to determine if we know which program this is.
#
#perform_step determine_program find_strings $PEASOUP_HOME/tools/match_program.sh
#
# # If we ran determine program and got a log, then see if we were successful.
# if [ -f logs/determine_program.log ]; then
# program=$(cat logs/determine_program.log |grep "Program is a version of "|sed -e "s/Program is a version of .//" -e "s/.$//")
# fi
# if [[ "$program" != "" ]]; then
# echo "Detected program is a version of '$program'"
#
# manual_test_script=$PEASOUP_HOME/tests/$program/test_script.sh
#
# if [[ -f "$manual_test_script" ]];then
# #check if the selected script succeeds
# #I'm currently capping the validation run to 6 minutes
# #to avoid the case where every test times out, but doesn't
# #invalidate the test.
# eval timeout 360 $manual_test_script `pwd`/$newname.ncexe `pwd`/$newname.ncexe &>logs/script_validation.log
#
# if [[ ! $? -eq 0 ]]; then
# echo "Manual Script Failure: test script fails to validate original program, ignoring selected script."
# manual_test_script=""
# fi
# else
# echo "Manual Test Script: $manual_test_script Not Found."
# manual_test_script=""
# fi
# else
# echo "Program not detected in signature database."
# fi
#At this point we will know if manual testing should be turned off automatically
#i.e., we will know if a manual_test_script file exists.
# if [ -z $manual_test_script ]; then
# phases_spec=" $phases_spec manual_test=off"
# else
# phases_spec=" $phases_spec manual_test=on"
# fi
#
# Run script to setup manual tests
#
#perform_step manual_test none $PEASOUP_HOME/tools/do_manualtests.sh $name $protected_exe $manual_test_script $manual_test_coverage_file
#
# remove the parts of the annotation file not needed at runtime
#
# perform_step fast_annot meds_static $PEASOUP_HOME/tools/fast_annot.sh
#
# sfuzz: simple fuzzing to find crashes and record crashing instruction
# @todo: 2nd arg is the benchmark name but we're currently passing in
# the binary in
#
# perform_step sfuzz none $PEASOUP_HOME/tools/do_sfuzz.sh $newname.ncexe $orig_exe crash.sfuzz.cso
# if crash found, feed the cso file to the watch allocate step
# if [ -f crash.sfuzz.cso ]; then
# step_options_watch_allocate="$step_options_watch_allocate --warning_file=crash.sfuzz.cso"
#fi
#
# cinderella: infer malloc and other libc functions
#
#perform_step cinderella clone,fill_in_indtargs,fill_in_cfg $PEASOUP_HOME/tools/do_cinderella.sh $cloneid
#
# For CGC, pad malloc
#
#perform_step cgc_hlx cinderella $SECURITY_TRANSFORMS_HOME/bin/cgc_hlx.exe --varid=$cloneid $step_options_cgc_hlx
#
# Do P1/Pn transform.
#
#perform_step p1transform meds_static,clone $PEASOUP_HOME/tools/do_p1transform.sh $cloneid $newname.ncexe $newname.ncexe.annot $PEASOUP_HOME/tools/bed.sh $PN_TIMEOUT_VALUE $step_options_p1transform
#
# Do integer transform.
#
#if [ -z "$program" ]; then
# program="unknown"
#fi
# perform_step integertransform meds_static,clone $PEASOUP_HOME/tools/do_integertransform.sh $cloneid $program $CONCOLIC_DIR $INTEGER_TRANSFORM_TIMEOUT_VALUE $step_options_integertransform
#
# perform step to instrument pgm with return shadow stack
#
#perform_step ret_shadow_stack meds_static,clone $PEASOUP_HOME/tools/do_rss.sh --varid $cloneid $step_options_ret_shadow_stack
#
# Do Twitcher transform step if twitcher is present
#
#if [[ "$TWITCHER_HOME" != "" && -d "$TWITCHER_HOME" ]]; then
# perform_step twitchertransform none $TWITCHER_HOME/twitcher-transform/do_twitchertransform.sh $cloneid $program $CONCOLIC_DIR $TWITCHER_TRANSFORM_TIMEOUT_VALUE
#fi
# input filtering
#perform_step input_filtering clone,fill_in_indtargs,fill_in_cfg $SECURITY_TRANSFORMS_HOME/bin/watch_syscall.exe --varid $cloneid --do_input_filtering $step_options_input_filtering
# watch syscalls
#perform_step watch_allocate clone,fill_in_indtargs,fill_in_cfg,pdb_register $SECURITY_TRANSFORMS_HOME/bin/watch_syscall.exe --varid $cloneid --do_sandboxing $step_options_watch_allocate
#
# check for any steps turned on by the --step option that aren't explicitly mentioned.
# if found, run the step as a plugin to $PS
#
do_plugins
# generate aspri, and assemble it to bspri
#perform_step generate_spri mandatory $SECURITY_TRANSFORMS_HOME/bin/generate_spri.exe $($PEASOUP_HOME/tools/is_so.sh a.ncexe) $cloneid a.irdb.aspri
# hack to work with cgc file size restrictions.
#stratafier_file=`ls -1 *nostrip 2>/dev/null |head -1`
#if [ "X$stratafier_file" = "X" ]; then
# stratafier_file=stratafier.o.exe
#fi
#perform_step spasm mandatory $SECURITY_TRANSFORMS_HOME/bin/spasm a.irdb.aspri a.irdb.bspri a.ncexe $stratafier_file libstrata.so.symbols
#
# perform_step fast_spri spasm $PEASOUP_HOME/tools/fast_spri.sh a.irdb.bspri a.irdb.fbspri
# preLoaded_ILR step
# perform_step preLoaded_ILR1 fast_spri $STRATA_HOME/tools/preLoaded_ILR/generate_hashfiles.exe a.irdb.fbspri
# perform_step preLoaded_ILR2 preLoaded_ILR1 $PEASOUP_HOME/tools/generate_relocfile.sh a.irdb.fbspri
# put a front end in front of a.stratafied which opens file 990 for strata to read.
# perform_step spawner stratafy_with_pc_confine $PEASOUP_HOME/tools/do_spawner.sh
# put a front end in front of a.stratafied which opens file 990 for strata to read.
# perform_step get_pins spasm,fast_spri $PEASOUP_HOME/tools/get_pins.sh
#
# zipr
# perform_step zipr fill_in_indtargs,fill_in_cfg,pdb_register env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ZIPR_INSTALL/lib $ZIPR_INSTALL/bin/zipr.exe --variant $cloneid --zipr:objcopy $PS_OBJCOPY $step_options_zipr
# copy TOCTOU tool here if it exists
#if [[ "$CONCURRENCY_HOME/toctou_tool" != "" && -d "$CONCURRENCY_HOME/toctou_tool" ]]; then
# perform_step toctou none $CONCURRENCY_HOME/do_toctou.sh
#fi
#
# if [[ "$CONCURRENCY_HOME/deadlock" != "" && -d "$CONCURRENCY_HOME/deadlock" ]]; then
# # copy deadlock tool here if it exists
# perform_step deadlock none $CONCURRENCY_HOME/do_deadlock.sh
# # enable some jitter in the scheduling
# perform_step schedperturb none $CONCURRENCY_HOME/do_schedperturb.sh
# fi
#
#
#select the output file name to use -- b.out.addseg if zipr is on.
#
# AT
# perform_step cgc_at_string none $DAFFY_HOME/anti_tamper/string_table_trick.sh $(basename $my_outfile)
# Basic sanity check to make sure protected CB is ok
# perform_step cgc_sanity_check none $PEASOUP_HOME/tools/cgc_sanity_check.sh $PWD/a.ncexe ${PWD}/$(basename $my_outfile)
#
# create a report for all of ps_analyze.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment