Penetration Test

Using scripting in pen testing

SCRIPTING FOR PENETRATION TESTING
  • Why bother with scripts?
    • Automate mundane/repetitive tasks
    • Faster
    • Less error prone
    • Repeatable
  • What is a script?
    • Interpreted sequence of commands
    • Written in a specific language with its own sytax
    • Easy to code
    • Not compiled or assembled
COMMON SCRIPTING LANGUAGES
  • Bash - Bourne Again Shell
    • Command shell for most Linux/MAC OS systems
    • Freely available version of the UNIX Bourne shell(sh)
  • PowerShell - Windows-based admin and automation shell
    • Available in Windows since 2006
    • Powerful scripting language
  • Ruby - object-oriented high-level interpreted general purpose programming language
    • Influenced by Perl, Smalltalk, Ada, Lisp
  • Python - object-oriented high-level interpreted general purpose programming language
    • Extensive available libraries
ADDITIONAL RESCOURCES
SCRIPTING
  • Variables
    • Temporary data storage
  • Substitutions
    • Input parameters and environment variables
  • Common operations
    • Strings and comparisons
  • Logic
    • Looping and flow control
  • Basic I/O
    • Read input and write output(file, terminal, and network)
  • Error handling
    • When things don't work
  • Arrays
    • Simple data structure
  • Encoding/decoding
    • Handling special characters
QUICK REVIEW
  • Scripts help automate repetitive actions
  • Scripts are good for standardizing testing activities
  • Scripts also reduce typing errors and make tests repeatable, as well as help in documenting test activities
相信未来 - 该面对的绝不逃避,该执著的永不怨悔,该舍弃的不再留念,该珍惜的好好把握。
原文地址:https://www.cnblogs.com/keepmoving1113/p/14088570.html