Popular New Releases in Security Testing
sqlmap
Albanwr Flameaxe
vuls
v0.19.5
nuclei
v2.6.8
dirsearch
dirsearch v0.4.2
beef
v0.5.4.0
Popular Libraries in Security Testing
by swisskyrepo python
29854 MIT
A list of useful payloads and bypass for Web Application Security and Pentest/CTF
by sqlmapproject python
22565 NOASSERTION
Automatic SQL injection and database takeover tool
by The-Art-of-Hacking python
9929 MIT
This repository is primarily maintained by Omar Santos and includes thousands of resources related to ethical hacking / penetration testing, digital forensics and incident response (DFIR), vulnerability research, exploit development, reverse engineering, and more.
by future-architect go
9130 GPL-3.0
Agent-less vulnerability scanner for Linux, FreeBSD, Container, WordPress, Programming language libraries, Network devices
by PowerShellMafia powershell
8456 NOASSERTION
PowerSploit - A PowerShell Post-Exploitation Framework
by projectdiscovery go
7947 MIT
Fast and customizable vulnerability scanner based on simple YAML based DSL.
by maurosoria python
7792
Web path scanner
by malwaredllc python
7312 GPL-3.0
An open-source post-exploitation framework for students, researchers and developers.
by beefproject javascript
7001
The Browser Exploitation Framework Project
Trending New libraries in Security Testing
by projectdiscovery go
7947 MIT
Fast and customizable vulnerability scanner based on simple YAML based DSL.
by RustScan rust
6109 GPL-3.0
🤖 The Modern Port Scanner 🤖
by yogeshojha javascript
3855 GPL-3.0
reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.
by projectdiscovery go
2972 MIT
httpx is a fast and multi-purpose HTTP toolkit allows to run multiple probers using retryablehttp library, it is designed to maintain the result reliability with increased threads.
by LasCC typescript
2850
The all-in-one Red Team extension for Web Pentester 🛠
by zhzyker python
2606
Exphub[漏洞利用脚本库] 包括Webloigc、Struts2、Tomcat、Nexus、Solr、Jboss、Drupal的漏洞利用脚本,最新添加CVE-2020-14882、CVE-2020-11444、CVE-2020-10204、CVE-2020-10199、CVE-2020-1938、CVE-2020-2551、CVE-2020-2555、CVE-2020-2883、CVE-2019-17558、CVE-2019-6340
by six2dez shell
2335 GPL-3.0
reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
by TophantTechnology python
2295
ARL(Asset Reconnaissance Lighthouse)资产侦察灯塔系统旨在快速侦察与目标关联的互联网资产,构建基础资产信息库。 协助甲方安全团队或者渗透测试人员有效侦察和检索资产,发现存在的薄弱点和攻击面。
by ihebski jupyter notebook
1789
One place for all the default credentials to assist the Blue/Red teamers activities on finding devices with default password 🛡️
Top Authors in Security Testing
1
20 Libraries
330
2
14 Libraries
4234
3
13 Libraries
2315
4
11 Libraries
1268
5
10 Libraries
2134
6
10 Libraries
504
7
10 Libraries
54
8
9 Libraries
1608
9
9 Libraries
689
10
9 Libraries
133
1
20 Libraries
330
2
14 Libraries
4234
3
13 Libraries
2315
4
11 Libraries
1268
5
10 Libraries
2134
6
10 Libraries
504
7
10 Libraries
54
8
9 Libraries
1608
9
9 Libraries
689
10
9 Libraries
133
Trending Kits in Security Testing
No Trending Kits are available at this moment for Security Testing
Trending Discussions on Security Testing
Memory leaks sensitive information - Ionic
Feature and price comparison of continuous inspection / static application security testing platforms
How do new features/changes in azure data factory become available?
How to do certificate chain validation on Android and iOS?
Get certain values from a JSON file using PowerShell
Owasp Zap and Amazon
Using OWASP ZAP Proxy for existing suite of Selenium tests
Sending low level raw HTTP/HTTPS requests in node JS
X-Frame-Options Header Not Set: How do I set it?
Best way to sanitize Input data to avoid script execution
QUESTION
Memory leaks sensitive information - Ionic
Asked 2022-Mar-10 at 14:51In our application, during the security testing, they were able to get the request and response details from the memory dump. Please find the following details they were able to get from the dump, is there any option or process we can implement to remove this from happening:
1CordovaHttpPlugin
2post https:/XXXXXXXXXX/XXXXXXXXXX/login
3username: XXXXXXXX
4password XXXXXXX
5json
6Authorization
7Bearer
8null
9Content-Type
10application/json
11Accept
12text
13ionic
14
Security team is using tool "fridump" for getting the memory data.
Is there any possible methods in ionic or tools that we can add to avoid this type of memory dump.
ANSWER
Answered 2022-Mar-10 at 14:51We were not able to resolve the issue. The security team advised us to prevent the application from installing in a rooted device for now, and also have all the data saved in the mobile side encrypted.
QUESTION
Feature and price comparison of continuous inspection / static application security testing platforms
Asked 2021-Oct-29 at 17:17Is there any representative comparison among major continuous inspection and static application security testing (SAST) platforms like SonarQube, Coverity, CodeScene, TeamScale, etc?
ANSWER
Answered 2021-Oct-29 at 17:17Although I'd be happy to be proven wrong, I think the answer is no, there is not such a comparison available publicly available that includes the commercial tools.
The first reason is the commercial vendors typically only offer their tools to prospective customers under the terms of a non-disclosure agreement. So, although prospective customers often do perform their own internal comparison before purchase, they can't publish the results.
The second reason relates to your request for a "representative" comparison. I assume you mean a comparison that will accurately predict how the tools will perform in your development environment. Unfortunately, the value of a given tool often depends a great deal on the programming languages, development culture, and internal politics of the adopting organization. For example, some tools prioritizing having low false positive rates (low noise), while others prioritize not overlooking anything (low false negatives), and which of those is preferable is highly subjective and organization dependent. There are a number of dimensions to the tool design space that are similarly not objectively comparable, and the tools are in different points in that space.
However, while the tool vendors require an NDA to perform an evaluation, it is otherwise usually free of charge (aside from whatever time you choose to spend on it). If you're in the market for a commercial tool, you might contact the vendors of interest to arrange for an evaluation.
Disclosure: I am a former employee of one of the vendors (Coverity/Synopsys) and have current financial interests regarding multiple vendors.
QUESTION
How do new features/changes in azure data factory become available?
Asked 2021-Sep-30 at 20:00Suppose I start using Azure Data Factory today, at some point the tool is likely to see improvements or other changes. Note that I am not talking about what I do inside the tool, but I am talking about the Data Factory itself. How will these changes become available to me?
- Will I be able to look at the changes before they happen (and how long)?
- Will I be able to stay on an old version if I do not like the new one or have not finished testing (e.g. security testing)?
- Is there any indication of how often changes are rolled out? (Every year, 10x per day)
Does any of the above depend on the type of change (big, small, feature/bug/vulnerability).
I suspect that people have this question for many similar tools, so though I am specifically interested in the Azure Data Factory at this time, an indication of whether the answer applies to other types of solutions (within Azure or perhaps it is even similar for other vendors) would be useful.
ANSWER
Answered 2021-Sep-30 at 20:00Suppose I start using Azure Data Factory today, at some point the tool is likely to see improvements or other changes. Note that I am not talking about what I do inside the tool, but I am talking about the Data Factory itself. How will these changes become available to me?
Will I be able to look at the changes before they happen (and how long)?
You are talking about a Managed Solution so I expect a continuous stream of (small) fixes and improvements. That said, changes are generally announced for various Azure Products. See the ADF updates
Big changes might be first accessible as an opt-in preview feature before becoming General Available.
Is there any indication of how often changes are rolled out? (Every year, 10x per day)
Since it is a managed solution, why bother with such details? Rest assured that breaking changes are very limited and announced well before.
Will I be able to stay on an old version if I do not like the new one or have not finished testing (e.g. security testing)?
Again, this is a managed cloud service we are talking about. It is not an installable product you can decide to stay on older versions forever. They will push changes and you have to hope it is for the better ;-)
I suspect that people have this question for many similar tools, so though I am specifically interested in the Azure Data Factory at this time, an indication of whether the answer applies to other types of solutions (within Azure or perhaps it is even similar for other vendors) would be useful.
It will vary per company per (type of) product. For most Azure Services the answer will be the same.
QUESTION
How to do certificate chain validation on Android and iOS?
Asked 2021-Jul-30 at 15:01Our app's security testing got a security issue related to certificate chain validation. It's CWE-296 https://cwe.mitre.org/data/definitions/296.html
To my knowledge, adding a certificate pinning solves this problem but I'm not sure if there is a way to do certificate chain validation without pinning.
OWASP-MASVS also mentions about CWE-296 here under references
Can someone please provide more knowledge on this? Possibly share some example app which does this.
We're using Okhttp
for networking!
ANSWER
Answered 2021-Jul-30 at 15:01Based on discussion with Jeroen Beckers and Sven Schleier from OWASP MSTG team, I learned that networking library (in our case Okhttp
) should handle certificate chain validation
by default. Unless the app has specific custom implementation of TrustManager where its trusting all certificate.
Sven mentioned that,
once all the certificate checks are in place (chain validation, expiry of the certificate etc.), SSL Pinning can be implemented. So validation of the chain of trust for certificates always need to be there, SSL Pinning is then just another layer to make Man-in-the-middle attacks harder.
Our issue might be false positively flagged by pen-tester.
Link of the discussion on OWASP Slack channel
QUESTION
Get certain values from a JSON file using PowerShell
Asked 2021-Jun-11 at 17:57I've seen a lot of questions about JSON and PowerShell these past hours and none helped me find a solution to this particular problem. And I'm sure it's something easy.
I want to extract all the url
fields of the plugins
objects in this JSON object (original URL is this: https://updates.jenkins.io/update-center.json):
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42
The plugins
object contains one object per plugin, where the plugin's name is the object's key. So I somehow have to iterate over all plugin objects and look for the url
property.
I want/have to do this using PowerShell (v5.1) but cannot find an easy way. Here is where I am stuck:
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42$all = (Get-Content(".\update-center.json") | convertfrom-json)
43$all.gettype().fullname
44
45$plugins = $all.plugins
46$plugins.gettype().fullname
47
I get this result:
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42$all = (Get-Content(".\update-center.json") | convertfrom-json)
43$all.gettype().fullname
44
45$plugins = $all.plugins
46$plugins.gettype().fullname
47System.Management.Automation.PSCustomObject
48System.Management.Automation.PSCustomObject
49
And now I hope to iterate over the individual plugin
objects and simply get the url
key's property, but I'm stuck:
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42$all = (Get-Content(".\update-center.json") | convertfrom-json)
43$all.gettype().fullname
44
45$plugins = $all.plugins
46$plugins.gettype().fullname
47System.Management.Automation.PSCustomObject
48System.Management.Automation.PSCustomObject
49$plugins | get-member -MemberType NoteProperty | foreach name | foreach $plugins.$_.url
50
The get-member
is supposed to get the individual plugins I suppose, but hours of poring over PowerShell documentation have clearly fried my brain. Help! :-)
ANSWER
Answered 2021-Jun-11 at 17:53I think this is what you're looking for, not exactly sure. Correct me if I'm wrong.
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42$all = (Get-Content(".\update-center.json") | convertfrom-json)
43$all.gettype().fullname
44
45$plugins = $all.plugins
46$plugins.gettype().fullname
47System.Management.Automation.PSCustomObject
48System.Management.Automation.PSCustomObject
49$plugins | get-member -MemberType NoteProperty | foreach name | foreach $plugins.$_.url
50$Json = Invoke-RestMethod https://updates.jenkins.io/update-center.json
51$Json = $Json -replace '^updateCenter.post\(|\);$' | ConvertFrom-Json
52
53$plugins = $Json.plugins
54
55foreach($prop in $plugins.psobject.properties.name)
56{
57 $plugins.$prop.url
58}
59
1{
2 "connectionCheckUrl": "http://www.google.com/",
3 "core": {
4 ...
5 },
6 "deprecations": {
7 ...
8 },
9 "generationTimestamp": "2021-05-19T12:16:52Z",
10 "id": "default",
11 "plugins": {
12 "42crunch-security-audit": {
13 "buildDate": "Oct 06, 2020",
14 "defaultBranch": "master",
15 "dependencies": [
16 ...
17 ],
18 "developers": [
19 ...
20 ],
21 "excerpt": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.",
22 "gav": "io.jenkins.plugins:42crunch-security-audit:3.8",
23 "issueTrackers": [
24 ...
25 ],
26 "labels": [
27 ...
28 ],
29 ...
30 "title": "42Crunch REST API Static Security Testing",
31 "url": "http://archives.jenkins-ci.org/plugins/42crunch-security-audit/3.8/42crunch-security-audit.hpi",
32 },
33 "AnchorChain": {
34 ...
35 "url": "http://archives.jenkins-ci.org/plugins/AnchorChain/1.0/AnchorChain.hpi",
36 ...
37 },
38 ... many hundreds more ...
39 }
40 ...
41}
42$all = (Get-Content(".\update-center.json") | convertfrom-json)
43$all.gettype().fullname
44
45$plugins = $all.plugins
46$plugins.gettype().fullname
47System.Management.Automation.PSCustomObject
48System.Management.Automation.PSCustomObject
49$plugins | get-member -MemberType NoteProperty | foreach name | foreach $plugins.$_.url
50$Json = Invoke-RestMethod https://updates.jenkins.io/update-center.json
51$Json = $Json -replace '^updateCenter.post\(|\);$' | ConvertFrom-Json
52
53$plugins = $Json.plugins
54
55foreach($prop in $plugins.psobject.properties.name)
56{
57 $plugins.$prop.url
58}
59https://updates.jenkins.io/download/plugins/testingbot/1.16/testingbot.hpi
60https://updates.jenkins.io/download/plugins/testinium/1.0/testinium.hpi
61https://updates.jenkins.io/download/plugins/testlink/3.16/testlink.hpi
62https://updates.jenkins.io/download/plugins/testng-plugin/1.15/testng-plugin.hpi
63https://updates.jenkins.io/download/plugins/testodyssey-execution/2.1.5/testodyssey-execution.hpi
64https://updates.jenkins.io/download/plugins/testopia/1.3/testopia.hpi
65https://updates.jenkins.io/download/plugins/testproject/2.10/testproject.hpi
66https://updates.jenkins.io/download/plugins/testquality-updater/1.3/testquality-updater.hpi
67https://updates.jenkins.io/download/plugins/testsigma/1.3/testsigma.hpi
68....
69....
70....
71
QUESTION
Owasp Zap and Amazon
Asked 2021-Jun-10 at 07:55I don't have much experience of penetration testing, but I am currently looking at OWASP Zap.
The website I am going to pentest runs on an Amazon EC2 instance. Amazon seems to have certain requirements when it comes to security testing: https://aws.amazon.com/security/penetration-testing/
The above website says that you can run security tests on a Amazon EC2 instance but not certain ones such as DNS zone walking, DoS, etc. which is fair enough.
The problem is that I can't see exactly what OWASP Zap will do when I click the "Attack" button and I obviously don't want to upset AWS!
Has anyone else used OWASP Zap on an EC2 instance? Did it you have to configure it to not do DoS attacks, etc? Is there any way I can find out what Zap is doing (I couldn't see anything in the documentation but may have missed something)?
ANSWER
Answered 2021-Jun-10 at 07:50Yes, I've done that. ZAP does not deliberately attempt DoS attacks (or any other attacks intended to cause damage) but it can still 'take out' insecure or badly configured applications. If you have permission from the website owner then they hopefully wont complain to Amazon and then you'll be ok.
For details of the scan rules ZAP uses see https://www.zaproxy.org/docs/alerts/ - those pages link to the relevant source code so that shpould provide you with more than enough detail ;)
QUESTION
Using OWASP ZAP Proxy for existing suite of Selenium tests
Asked 2021-May-25 at 12:48We have a suite of automated regression tests driven using Selenium for an Angular app with a .NET Core WEB API backend.
The intention is to include some automated security testing as part of our overnight build/test run.
From reading so far it looks like running ZAP as an intercepting proxy between Selenium and our web application is the way to go (see 'Proxy Regression/Unit Tests' in https://www.zaproxy.org/docs/api/#exploring-the-app) but I'm struggling to find clear documentation/examples.
What is the simplest way to achieve this using OWASP ZAP, and are there any definitive articles/examples available?
ANSWER
Answered 2021-May-25 at 12:48Start with the packaged full scan: https://www.zaproxy.org/docs/docker/full-scan/
Set the port and then proxy your selenium tests through ZAP. Use the -D
parameter to pause ZAP until your tests have finished. For more ZAP automation options see https://www.zaproxy.org/docs/automate/
QUESTION
Sending low level raw HTTP/HTTPS requests in node JS
Asked 2021-Apr-19 at 11:38I am in the process of writing an intercepting proxy tool like Burpsuite for security testing. An important part of that would be sending malformed HTTP requests in the case of which we would have to give the user full control over the request!
So, I can't have complete control while using a library! I need to be able to send raw HTTP requests to the target hosts like,
1GET / HTTP/1.1
2Host: google.com
3
I tried using the node JS net module, and I was able to connect to host on port 80 (HTTP), and while connecting to port 443 (HTTPS), a connection is established but returns an empty response!
On some researching, I found out that this has something to do with SSL, as I tried telnet and it too failed for HTTPS connections and by looking at some stackoverflow answers!
Is there any option through which I can directly send raw HTTP/HTTPS requests directly from my node application?
Thanks!
ANSWER
Answered 2021-Apr-19 at 11:38There is a module http-tag, which allow writing literal http messages like -
1GET / HTTP/1.1
2Host: google.com
3const net = require('net')
4const HTTPTag = require('http-tag')
5
6const socket = net.createConnection({
7 host: 'localhost',
8 port: 8000,
9}, () => {
10 // This callback is run once, when socket connected
11
12 // Instead of manually writing like this:
13 // socket.write('GET / HTTP/1.1\r\n')
14 // socket.write('My-Custom-Header: Header1\r\n\r\n')
15
16 // You will be able to write your request(or response) like this:
17 const xHeader = 'Header1' // here in the epressions you can pass any characters you want
18 socket.write(
19 HTTPTag`
20 GET / HTTP/1.1
21 My-Custom-Header: ${xHeader}
22
23 `
24 )
25 socket.end()
26})
27
28socket.on('close', hasError => console.log(`Socket Closed, hasError: ${hasError}`))
29
30// set readable stream encoding
31socket.setEncoding('utf-8')
32socket.on('data', data => console.log(data))
33
Regarding TLS, currently i am in research on built-in node modules, and I haven’t view the tls yet.
QUESTION
X-Frame-Options Header Not Set: How do I set it?
Asked 2021-Feb-02 at 06:43I am using Apache server for Wamp application. While doing security testing, I got these error reports which says:
X-Frame-Options Header Not Set. For this I know that there are 3 types of X-Frame Options. But where do I implement the SAMEORIGIN option and how?
X-Content-Type-Options Header Missing.
What do I need to do to solve these? Thank you.
ANSWER
Answered 2021-Feb-02 at 06:43Set the following headers:
1X-Frame-Options: SAMEORIGIN
2X-Content-Type-options: nosniff
3
Since you are using Apache, add the following to the apache config:
1X-Frame-Options: SAMEORIGIN
2X-Content-Type-options: nosniff
3Header always set X-Frame-Options "SAMEORIGIN"
4Header always set X-Content-Type-Options nosniff
5
The above won't do anything for a local test server. But, you should always set them in public production servers.
Remember: Even though it doesn't do anything for local servers, you could develop your website with this environment, so that it doesn't suffer when you release it on production.
QUESTION
Best way to sanitize Input data to avoid script execution
Asked 2020-Dec-30 at 12:53I'm new to Laravel community and recently I tried building a small App. During a security testing I found any input with Script element to a form actually executes that in real time.
ExampleFollowing are the combination of input that I have tried so far.
- Foo (Works Correctly)
- Fooalert(1) (Throws a alert window)
1<input type="text" name="name">
2
This is a security issue and I'm looking on possibilities to fix this. I'm sure any data before entering to database gets sanitized but issue is with HTML display.
ANSWER
Answered 2020-Dec-30 at 12:31htmlspecialchars trim stripslashes
Before sending a query you can just clear you value of input:
1<input type="text" name="name">
2function clear($data){
3 $data = trim($data);
4 $data = stripslashes($data);
5 $data = htmlspecialchars($data);
6}
7
8clear($_POST['name']);
9
10
if you want to use Laravel validation:
1<input type="text" name="name">
2function clear($data){
3 $data = trim($data);
4 $data = stripslashes($data);
5 $data = htmlspecialchars($data);
6}
7
8clear($_POST['name']);
9
10public function store(Request $request)
11{
12 $validated = $request->validate([
13 'name' => 'required|max:255',
14 'body' => 'required',
15 ]);
16
17}
18
Errors you can show on the view just using loop on $errors
:
1<input type="text" name="name">
2function clear($data){
3 $data = trim($data);
4 $data = stripslashes($data);
5 $data = htmlspecialchars($data);
6}
7
8clear($_POST['name']);
9
10public function store(Request $request)
11{
12 $validated = $request->validate([
13 'name' => 'required|max:255',
14 'body' => 'required',
15 ]);
16
17}
18@if ($errors->any())
19 <div class="alert alert-danger">
20 <ul>
21 @foreach ($errors->all() as $error)
22 <li>{{ $error }}</li>
23 @endforeach
24 </ul>
25 </div>
26@endif
27
or
1<input type="text" name="name">
2function clear($data){
3 $data = trim($data);
4 $data = stripslashes($data);
5 $data = htmlspecialchars($data);
6}
7
8clear($_POST['name']);
9
10public function store(Request $request)
11{
12 $validated = $request->validate([
13 'name' => 'required|max:255',
14 'body' => 'required',
15 ]);
16
17}
18@if ($errors->any())
19 <div class="alert alert-danger">
20 <ul>
21 @foreach ($errors->all() as $error)
22 <li>{{ $error }}</li>
23 @endforeach
24 </ul>
25 </div>
26@endif
27@error('name')
28 <div class="alert alert-danger">{{ $message }}</div>
29@enderror
30
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Security Testing
Tutorials and Learning Resources are not available at this moment for Security Testing