当前位置:网站首页>[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
边栏推荐
- After job hopping at the end of the year, I interviewed more than 30 companies in two weeks and finally landed
- The usage of micro service project swagger aggregation document shows all micro service addresses in the form of swagger grouping
- JVM原理简介
- 金仓数据库KingbaseES 插件kdb_date_function
- 使用BENCHMARKSQL工具对KingbaseES预热数据时执行:select sys_prewarm(‘NDX_OORDER_2 ‘)报错
- Summary of training competition (Lao Li's collection of questions)
- Priv-app permission异常
- Leetcode simple question: the key with the longest key duration
- [fairseq] error: typeerror:_ broadcast_ coalesced(): incompatible function arguments
- [set theory] binary relationship (binary relationship notation | binary relationship from a to B | number of binary relationships | example of binary relationship)
猜你喜欢

data2vec! New milestone of unified mode

Library management system based on SSM

Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected

Number of uniform strings of leetcode simple problem

vulnhub HA: Natraj

有道云笔记

联发科技2023届提前批IC笔试(题目)

Introduction of pointer variables in function parameters

FFMpeg filter

【工具跑SQL盲注】
随机推荐
2.14 summary
C primre plus Chapter 10 question 6 inverted array
Pyqt control part (II)
[set theory] relational representation (relational matrix | examples of relational matrix | properties of relational matrix | operations of relational matrix | relational graph | examples of relationa
Small program animation realizes the running lantern and animation object
AWS VPC
2022-02-12 (338. Bit count)
商城系统搭建完成后需要设置哪些功能
How do you use lodash linking function- How do you chain functions using lodash?
I've been in software testing for 8 years and worked as a test leader for 3 years. I can also be a programmer if I'm not a professional
消息队列(MQ)介绍
Symbol of array element product of leetcode simple problem
Truncated sentences of leetcode simple questions
Leetcode simple problem delete an element to strictly increment the array
7. Integrated learning
FuncS sh file not found when using the benchmarksql tool to test kingbases
Human resource management system based on JSP
Know that Chuangyu cloud monitoring - scanv Max update: Ecology OA unauthorized server request forgery and other two vulnerabilities can be detected
2022-02-13 (347. Top k high frequency elements)
怎么用Kotlin去提高生产力:Kotlin Tips