当前位置:网站首页>[XSS bypass - protection strategy] understand the protection strategy and better bypass
[XSS bypass - protection strategy] understand the protection strategy and better bypass
2022-07-03 04:38:00 【Black zone (rise)】
Catalog
3.2、 Common event properties :
3.3、 Label of non event attribute
Four 、 Sensitive keywords ( character ) Filter
6、 ... and 、 Content security policy (CSP)
One 、 sketch
Now? Web The application layer has many strategies to deal with XSS harm
eg:
Specific tag filtering 、 Event filtering 、 Sensitive keyword filtering ……
Browsers will also be right XSS Limit the exploitation of vulnerabilities (XSS Auditor、CSP etc. )
Two 、 Specific tag filtering
2.1、 shortcoming :
Filter out danger labels ( Such as script、iframe etc. ) It will result in the inability to execute the script
2.2、 present situation :
Any kind of label , Whether legal or not , Can be constructed XSS Code
< label οnclick="alert(/xss/)"> Come on, me </ label >
2.3、 utilize :
Property value : The output point is HTML The attribute of the tag or in Javascript In the code , Simply close 、 Splice properties or Javascript The code can execute XSS Code
HTML:<video><source οnerrοr="alert(/xss/)">
3、 ... and 、 Event filtering
3.1、 brief introduction :
Generally, many will be filtered out HTML Tag's event properties , You need to traverse all available event attributes , Test for omissions ( test :Burp Or write a script Fuzz)
3.2、 Common event properties :
onafterprint、oninput、onscroll、onbeforeprint 、oninvalid 、onabort、onbeforeunload 、onreset 、oncanplay、onerror、 onselect 、oncanplaythrough、onhaschange、 onsubmit、 ondurationchange、onload 、onkeydown 、onemptied、onmessage 、onkeypress、 onended、onoffline、 onkeyup、 onerror、ononline 、onclick、 onloadeddata、onpagehide、 ondblclick、 onloadedmetadata、onpageshow 、ondrag、 onloadstart、onpopstate、 ondragend、 onpause、onredo、 ondragenter、 onplay、onresize 、ondragleave 、onplaying、onstorage 、ondragover 、onprogress、onundo、 ondragstart 、onratechange、onunload、 ondrop、 onreadystatechange、onblur 、onmousedown、 onseeked、onchange 、onmousemove 、onseeking、oncontextmenu 、onmouseout、 onstalled、onfocus、 onmouseover 、onsuspend、onformchange 、onmouseup 、ontimeupdate、onforminput、onmousewheel、 onvolumechange
3.3、 Label of non event attribute
effect : Can be used to execute JavaScript Code
eg:JavaScript Fake protocol
<a href="javascript:alert(/xss/)"> Come on, me </a>
Four 、 Sensitive keywords ( character ) Filter
(1) Filter “.”
(2) Filter “()”
(3) Filter space
……
5、 ... and 、XSS Auditor
5.1、 summary :
Responsible for scanning the source code of the website , Looking for something like cross site scripting (XSS) Attack mode , This attack may attempt to run malicious code in the user's browser . By checking the input , Determine whether the content appears in the output . If meet XSS Auditor The filter conditions of , Will directly prevent script execution . Make reflective XSS The role of loopholes is gradually weakened .
6、 ... and 、 Content security policy (CSP)
6.1、 summary :
Content security policy (CSP) It is the most important Web One of the security protection mechanisms , Content security policy (CSP) It's an extra layer of security , Used to detect and weaken certain types of attacks , Including cross site scripts (XSS) And data injection attacks .
To alleviate potential cross site scripting problems , The browser's extender system introduces a content security policy (CSP), Will make the extender more secure by default , Developers can create and enforce rules , Manage the content that the website allows to load . Developers can use this tool to lock their applications in a variety of ways , Reduce content injection vulnerabilities ( Such as cross site scripting ) The risk of , And reduce the permission of its application execution
The content security policy uses the whitelist mechanism to manage the resources to be loaded or executed by the website . In the web page , Such a strategy is through HTTP Header information or meta Label to define .
Although this strategy can prevent attackers from loading malicious code across domains from external websites , however CSP It does not prevent data leakage . At present, many security researchers have proposed a variety of technologies to bypass content security policies , And use this technology to extract the required data from the target website .
7、 ... and 、 recommend
【XSS Cross Station collection 】 reflective 、 Storage type 、DOM class XSS principle ; Output in HTML、CSS、Javascript In the code https://blog.csdn.net/qq_53079406/article/details/123694180?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165672818516782248534754%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165672818516782248534754&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-4-123694180-null-null.185^v2^control&utm_term=xss&spm=1018.2226.3001.4450【xss Tools bypass 】xss And burpsuite、 front end 、 Dictionaries ……
https://blog.csdn.net/qq_53079406/article/details/123901334?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165672818516782248534754%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165672818516782248534754&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-123901334-null-null.185^v2^control&utm_term=xss&spm=1018.2226.3001.4450
边栏推荐
- The reason why the entity class in the database is changed into hump naming
- X-ray normal based contour rendering
- [fxcg] market analysis today
- MySQL winter vacation self-study 2022 12 (3)
- The programmer went to bed at 12 o'clock in the middle of the night, and the leader angrily scolded: go to bed so early, you are very good at keeping fit
- Sdl2 + OpenGL glsl practice (Continued)
- 金仓KFS数据双向同步场景部署
- STM32 reverse entry
- 2022 a special equipment related management (elevator) analysis and a special equipment related management (elevator) simulation test
- 【SQL注入】联合查询(最简单的注入方法)
猜你喜欢
2022 new examination questions for the main principals of hazardous chemical business units and examination skills for the main principals of hazardous chemical business units
UiPath实战(08) - 选取器(Selector)
Integration of Android high-frequency interview questions (including reference answers)
MC Layer Target
When using the benchmarksql tool to test the concurrency of kingbasees, there are sub threads that are not closed in time after the main process is killed successfully
Design and implementation of JSP logistics center storage information management system
2022 registration of G2 utility boiler stoker examination and G2 utility boiler stoker reexamination examination
When using the benchmarksql tool to preheat data for kingbasees, execute: select sys_ Prewarm ('ndx_oorder_2 ') error
使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错
X-ray normal based contour rendering
随机推荐
Symbol of array element product of leetcode simple problem
Internationalization and localization, dark mode and dark mode in compose
Truncated sentences of leetcode simple questions
[BMZCTF-pwn] 18-RCTF-2017-Recho
STM32 reverse entry
FISCO bcos zero knowledge proof Fiat Shamir instance source code
The usage of micro service project swagger aggregation document shows all micro service addresses in the form of swagger grouping
跨境电商多商户系统怎么选
[set theory] Cartesian product (concept of Cartesian product | examples of Cartesian product | properties of Cartesian product | non commutativity | non associativity | distribution law | ordered pair
Small sample target detection network with attention RPN and multi relationship detector (provide source code, data and download)
Use the benchmarksql tool to perform a data prompt on kingbases. The jdbc driver cannot be found
vulnhub HA: Natraj
商城系统搭建完成后需要设置哪些功能
一名外包仔的2022年中总结
Network security textual research recommendation
2022 registration examination for safety production management personnel of hazardous chemical production units and examination skills for safety production management personnel of hazardous chemical
[pat (basic level) practice] - [simple simulation] 1063 calculate the spectral radius
Design and implementation of JSP logistics center storage information management system
【SQL注入】联合查询(最简单的注入方法)
Priv-app permission异常