| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Information Security Industry Practitioners (Web Security / Penetration Testing) Interview Questions 1.1
Introduce the experience of burrowing (or CTF experience) that you think is interesting
What are the more vulnerabilities you usually use? The principle of related vulnerabilities? And a fix for the vulnerability?
What tools do you usually use and the characteristics of the corresponding tools?
How to do sql injection / upload Webshell if you encounter waf? Please write the process of bypassing WAF (SQLi, XSS, upload vulnerability)
Refer to the following three
My Way of WafBypass (SQL Injection)
My Way of WafBypass (Upload)
My Way of WafBypass (Misc)
Talk about the idea of lifting the rights of Windows system and Linux system?
List all high-risk vulnerabilities of open source components that you know (more than ten)
Describe a CVE or POC that you have studied in depth.
SQLi
Add single quotes, double quotes, order by, rlike, sleep, benchmark, operator, modify data type, error injection statement test
Introduce the cause of SQL injection vulnerabilities, how to prevent it? What are the injection methods? In addition to database data, what are the ways to use it?
The principle of wide character injection? How to use the wide character injection vulnerability, how to construct and repair the payload?
Popularly speaking, gbk, big5 and other codes account for two bytes. After the sql statement enters the backend, the single quotes are escaped. The escaped \ is %5C, and the current %xx and %5C can be combined into two. When the characters are in bytes, the subsequent single quotes can escape, resulting in injection. More common gbk, %df' => %df%5c%27 => 运'. Already single quotes, the rest is almost the same as normal injection. Fix the way by setting the MYSQL database character set utf8mb4, PHP character set utf-8.
This is too much, a lot of online search. Mainly depends on the filtering and protection of the target site. Common bypass can be /**/ replace spaces, /!00000union/ is equal to union, or use front-end filtering, add angle brackets <>. Cases are too common. If you filter functions or keywords, you can try other equivalent functions that can achieve results. Keywords such as or 1=1 can be replaced with ||1, or with operators such as /, %. The same effect. In short, still look at the requirements.
If it is get type, directly, sqlmap -u "injection point URL".
If it is post type, you can sqlmap -u "injection point URL" -data="post parameter"
If it is a cookie type, X-Forwarded-For, etc., when you can access it, use Burpsuite to capture the package, replace it with the * mark, put it in the file, and then sqlmap -r "file address"
Below 5.0, there is no information_schema system table, can not list names, etc., can only violently run table names. 5.0 is multi-user single operation, 5.0 or more is multi-user and multi-operation.
root permissions and the absolute path to the site.
demo.do?DATA=AjAxNg==
Domain
If the protocol of the two pages, the port and the domain name are the same, it can be considered to be homologous.
read cookies, LocalStorage and IndexDB read DOM elements Send an AJAX request
Probably the same subdomain, the main domain has different meanings, you can solve the cross-domain by setting document.domain in both rooms.
When the primary domain is the same, cross-domain, you can set document.domain as above.
When the primary domain is different, you can set up CORS on the server to make cross-domain requests through jsonp and websocket. H5 added the window.postMessage method to resolve cross-domain requests.
Request json data via <script> like server, not subject to the same-origin policy.
Ajax
The full name of ajax is Asynchronous JavaScript and XML, asynchronous javascript and XML technology. Follow the same-origin policy, but can be circumvented by jsonp, etc.
XSS cross-site attack
Browser strategy
All three browsers follow the same-origin policy, Content Security Policy (CSP), Cookie Security Policy (httponly, Secure, Path)
CSP: Content Security Policy, content security policy. It is a security mechanism for breeding XSS attacks. The idea is to configure trusted content sources in the form of server whitelists, which can be used by client web application code.
XSS
XSS is a cross-site scripting attack, in which data submitted by users can be constructed to execute, thus stealing user information and other attacks. Fixing method: Escape character entities, use HTTP Only to prohibit JavaScript from reading cookie values, check on input, and use the same character encoding for browser and web application.
Personal understanding is to safely filter the data submitted by the user and then directly input into the page, causing the execution of the js code. As for the specific scene, there is a risk that the output may be affected by xss.
XSS worm: XSS attacks can cause mutual infections among users in the system, causing the entire system user to fall, and the XSS vulnerability that can cause this harm becomes an XSS worm.
- Construct a self-replicating reflective XSS
2, insert comments, message box
- The user clicks on the link and the link content points to the same XSS vector. That is, the page of the stored type xss injected into the worm code. When the link is clicked, it will continue to cause the worm to spread.
Message Board/Comment/Article Post/Private Message...
- Change the name of the local destructive program.
github has some ready-made xss scripts for scanning intranet ports, which can be used for reference, and then further utilized according to the detected information, such as opening redis, etc., and then using the vulnerability to getshell.
CRLF injection
CRLF is the abbreviation for carriage return + line feed. I have encountered relatively few, and I have never dug through such a hole. In short, it is generally possible to control the response of the server by submitting a malicious data containing a carriage return and a line feed. I have encountered potential CRLF after submitting a carriage return and a new line. The use of CRLF can be XSS, malicious redirect location, and set-cookie.
CSRF
CSRF is a cross-site request forgery attack. XSS is one of many means of implementing CSRF because there is no confirmation that the user is voluntarily initiated when the critical operation is performed. Fix: Filter out the pages that need to be protected and embed the Token, enter the password again, and verify the Referer.
CSRF is a cross-site request forgery that sends a request to the server as a victim. In essence, the individual feels that the server does not check the identity of the user who submitted the operation while performing some sensitive operations.
Defense CSRF is generally plus referer and csrf_token. For details, please refer to this CSRF attack response to CSRF attacks
CSRF is a cross-site request forgery attack initiated by the client
SSRF is server-side request forgery, initiated by the server
Replay attack is to replay the intercepted data packets for identity authentication and other purposes.
SSRF
Logical Vulnerabilities
The password recovery vulnerability exists in the password to allow brute force cracking, the existence of universal recovery documents, the ability to skip the verification step, the recovery of the voucher can be obtained, etc. to obtain the password through the password recovery function provided by the manufacturer.
The most common authentication vulnerability is session fixed attack and cookie spoofing. You can fake user identity by getting Session or Cookie.
The verification code exists in the verification code vulnerability to allow brute force cracking, and the verification code can be bypassed by Javascript or packet modification.
Override access (horizontal/vertical/unauthorized)
Talk about the difference between horizontal/vertical/unauthorized unauthorized access?
How to detect the violation of power?
XML injection
What is XXE? What is the repair plan?
XXE is an XML external entity injection attack. XML can request local or remote content by calling an entity. Similar to remote file protection, it can cause related security issues, such as sensitive file reading. Repair method: The XML parsing library strictly prohibits the parsing of external entities when called.
URL redirection
URL whitelist bypass
HTML5
H5 has added a lot of tags and has a lot of options to bypass the xss defense. There is also the addition of local storage, localstorage and session storage, which can be modified by xss to achieve a similar storage xss effect.
java
struts2 , spring, spring security, shiro, etc.
PHP
php's configuration file php.ini has been modified. When display_errors = On is changed to display_errors = off, there is no error message. Add error_reporting(0) at the beginning of the php script; it can also achieve the effect of closing the error. In addition to the above, you can also add @ in front of the execution statement
Close the error, set open_basedir, disable the dangerous function, open gpc. There is a specific article on the security configuration, which belongs to the scope of operation and maintenance.
Exist in version 5.3.4, generally use the truncation of the file name when the file is uploaded, or there may be a 00 stage when the file is operated. For example, filename=test.php%00.txt will be truncated to test.php, and 00 is ignored. When the system reads the file name, if it encounters 0x00, it will consider that the reading has ended.
Personally, there are two types of static detection and dynamic detection. Static detection, such as finding dangerous functions, such as eval, system, etc. Dynamic detection is the action to be performed when the script is running, such as file operations, socket operations, and so on. The specific method can be detected by D shield or other killing software, and now there is webshell recognition based on machine learning.
Middleware
IIS, Apache, nginx, Lighttpd, Tomcat
Tomcat/Jetty/JBOSS/WebLogic/Coldfusion/Websphere/GlassFish
IIS 6.0 /xx.asp/xx.jpg "xx.asp" is the folder name
IIS 7.0/7.5 Default Fast-CGI is enabled. Enter /1.php directly after the image address in the url, and the normal image will be parsed as php.
Nginx The version is less than or equal to 0.8.37. The method is the same as IIS 7.0/7.5, and the Fast-CGI can be used when it is closed. empty byte code xxx.jpg%00.php
Apache The uploaded file is named test.php.x1.x2.x3, and Apache is suffixed from right to left.
lighttpd xx.jpg/xx.php
Database
Mysql version is larger than 5.1 version udf.dll file must be placed in the lib\plugin folder under the MYSQL installation directory.
Mysql version is less than version 5.1. The udf.dll file is placed in c:\windows\system32 under Windows 2003 and c:\winnt\system32 under windows2000.
Master the mysql database account has the mysql insert and delete permissions to create and discard the function, generally the root account is better, with the other accounts of the root account can also be used.
Permission to write udf.dll to the appropriate directory.
infomation_schema, msyql, performance_scheme, test
The user table under the mysql database.
Linux
Emergency Response
Information Collection
Summary of ways to bypass the CDN to find real IP on the site
If you are given a website, what is your penetration testing idea? Subject to written authorization
Obtain the whois information of the domain name, obtain the registrant's email name and phone number.
Query the server side station and the sub-domain name site, because the main station is generally difficult, so first look at the side stations for general-purpose cms or other vulnerabilities.
View the server operating system version, web middleware, to see if there are known vulnerabilities, such as IIS, APACHE, NGINX parsing vulnerabilities
View the IP, perform an IP address port scan, and perform vulnerability detection on the responding port, such as rsync, heart bleeding, Mysql, ftp, ssh weak password, etc.
Scan the site directory structure to see if you can traverse the directory, or sensitive file leaks, such as php probe
google hack further probes website information, background, sensitive files
Start detecting vulnerabilities such as XSS, CSRF, SQL injection, code execution, command execution, unauthorized access, directory read, arbitrary file read, Download, file contains, remote command execution, weak password, upload, editor vulnerability, brute force, etc.
Get the webshell or other permissions using the above method
Elevate the server, such as mysql udf privilege under windows, serv-u privilege, windows low version of the vulnerability, such as iis6, pr, Brazilian barbecue linux dirty cow vulnerability, linux kernel version vulnerabilities, mysql root privilege under linux and oracle low privilege
In the infiltration process, what is the value of collecting the target station registrant mailbox for us?
Drop the social library to see if there is any password leaked, and then try to log in to the background with the leaked password.
Use the mailbox as a keyword to throw into the search engine.
Use the searched related information to find other mails and get the common social accounts.
Social workers find social accounts, which may find the administrator's habit of setting passwords.
Use the existing information to generate a dedicated dictionary.
Observe what non-popular websites the administrator often visits, take it, and you will get more good things.
Find vulnerable bugs on the web.
If open source, you can also download the corresponding source code for code auditing.
A mature and relatively safe CMS, the meaning of sweeping the catalog when infiltrating?
sensitive files, secondary directory scanning
The misoperation of the webmaster such as: compressed files of the website backup, description.txt, secondary directory may store other sites
| Back | FazBrowse Home | New Git URL |