Hacking Articles Tips Tricks Videos Tutorials
471 subscribers
66K photos
15 videos
157 files
132K links
Exploit
Pentesting
Hacking
Red Team
Blue Team
Kali Linux
Bug Bounty
Black Hat
Cyber security etc

@Hacking_Video
@Hacking_attack
Download Telegram
njsscan is a static application testing (SAST) tool that can find insecure code patterns in your node.js applications using simple pattern matcher from libsast (https://github.com/ajinabraham/libsast) and syntax-aware semantic code pattern search tool semgrep (https://github.com/returntocorp/semgrep).
Installation pip install njsscan Requires Python 3.6+ and supports only Mac and Linux Command Line Options $ njsscan
usage: njsscan [-h] [--json] [--sarif] [--sonarqube] [--html] [-o OUTPUT] [-c CONFIG] [--missing-controls] [-w] [-v] [path ...]

positional arguments:
path Path can be file(s) or directories with source code

optional arguments:
-h, --help show this help message and exit
--json set output format as JSON
--sarif set output format as SARIF 2.1.0
--sonarqube set output format compatible with SonarQube
--html set output format as HTML
-o OUTPUT, --output OUTPUT
output filename to save the result
-c CONFIG, --config CONFIG
Location to .njsscan config file
--missing-controls enable missing security controls check
-w, --exit-warning non zero exit code on warning
-v, --version show njsscan ve rsion Example Usage Cross Site Scripting Vulnerability. │ ├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ SEVERITY │ ERROR │ ├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤ │ FILES │ ╒════════════════╤═══════════════════════════════════════════════╕ │ │ │ │ File │ test.js │ │ │ │ ├────────────────┼───────────────────────────────────────────────┤ │ │ │ │ Match Position │ 5 - 46 │ │ │ │ ├────────────────┼───────────────────────────────────────────────┤ │ │ │ │ Line Number(s) │ 7: 8 │ │ │ │ ├────────────────┼───────────────────────────────────────────────┤ │ │ │ │ Match String │ const { name } = req.query; │ │ │ │ │ │ res.send(' Hello :' + name + "") │ │ │ │ ╘════════════════╧═══════════════════════════════════════════════╛ │ ╘═════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════╛">$ njsscan test.js
- Pattern Match ████████████████████████ ;████████████████████████████████████ 1
- Semantic Grep ███████████████████████████ 160

njsscan: v0.1.9 | Ajin Abraham | opensecurity.in
╒═════════════╤═══════════════════════════════════════════════════ 552;═══════════════════════════════════════════╕
│ RULE ID │ express_xss │
├─────────────┼─────────────────────────────────────────────────────────────── ────────────────────────────────┤
│ OWASP │ A1: Injection │
├─────────────┼──────────────────────────────────────────────────────────────────────────^ 72;────────────────────┤
│ CWE │ CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') │
├─────────────┼──────────────────────────────────────────────────────────────────────────────────────& #9472;────────┤

___________________________
@hacking_Attack
@Hacking_Video
│ DESCRIPTION │ Untrusted User Input in Response will result in Reflected Cross Site Scripting Vulnerability. │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ SEVERITY │ ERROR │
├─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────┤
│ FILES │ ╒═══════_ 52;════════╤═══════════════════════════════════════════════╕ │
│ │ │ File │ test.js │ │
│ │ ├────────────────┼───────────────────────────────────^ 72;───────────┤ │
│ │ │ Match Position │ 5 - 46 │ │
│ │ ├────────────────┼───────────────────────────────────────────────┤ │
│ │ │ Line Number(s) │ 7: 8 │ │
│ │ ├& #9472;───────────────┼───────────────────────────────────────────────┤ │
│ │ │ Match String │ const { name } = req.query; │ │
│ │ │ │ res.send(' Hello :' + name + "") │ │
│ │ ╘════════════════╧════λ 2;══════════════════════════════════════════╛ │
╘═════════════╧══════════════════════════════════════════════════════════════════════════════ 552;════════════════╛ nodejsscan SAST nodejsscan, built on top of njsscan provides a full fledged vulnerability management (https://www.kitploit.com/search/label/Vulnerability%20Management) user interface along with other nifty integrations.

___________________________
@hacking_Attack
@Hacking_Video
See nodejsscan (https://github.com/ajinabraham/nodejsscan) Python API >> from njsscan.njsscan import NJSScan >>> node_source = '/node_source/true_positives/sqli_node.js' >>> scanner = NJSScan([node_source], json=True, check_controls=False) >>> scanner.scan() { 'templates': {}, 'nodejs': { 'node_sqli_injection': { 'files': [{ 'file_path': '/node_source/true_positives/sqli_node.js', 'match_position': (1, 24), 'match_lines': (4, 11), 'match_string': 'var employeeId = req.foo;\n\nvar sql = "SELECT * FROM trn_employee WHERE employee_id = " + employeeId;\n\n\n\nconnection.query(sql, function (error, results, fields) {\n\n if (error) {\n\n throw error;\n\n }\n\n console.log(results);' }], 'metadata': { 'owasp': 'A1: Injection', 'cwe': "CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", 'description': 'Untrusted input concatinated with raw SQL query can result in SQL Injection.', 'severity': 'ERROR' } } }, 'errors': [] }">>>> from njsscan.njsscan import NJSScan
>>> node_source = '/node_source/true_positives/sqli_node.js'
>>> scanner = NJSScan([node_source], json=True, check_controls=False)
>>> scanner.scan()
{
'templates': {},
'nodejs': {
'node_sqli_injection': {
'files': [{
'file_path': '/node_source/true_positives/sqli_node.js',
'match_position': (1, 24),
'match_lines': (4, 11),
'match_string': 'var employeeId = req.foo;\n\nvar sql = "SELECT * FROM trn_employee WHERE employee_id = " + employeeId;\n\n\n\nconnection.query(sql, function (error, results, fields) {\n\n if (error) {\n\n throw error;\n\n }\n\n console.log(results);'
}],
'metadata': {
'owasp': 'A1: Injection',
'cwe': "CWE-89: Improper Neutralization of Special Element s used in an SQL Command ('SQL Injection')",
'description': 'Untrusted input concatinated with raw SQL query can result in SQL Injection.',
'severity': 'ERROR'
}
}
},
'errors': []
} Configure njsscan A .njsscan file in the root of the source code directory allows you to configure njsscan. You can also use a custom .njsscan file using --config argument. ---
- nodejs-extensions:
- .js

template-extensions:
- .new
- .hbs
- ''

ignore-filenames:
- skip.js

ignore-paths:
- __MACOSX
- skip_dir
- node_modules

ignore-extensions:
- .jsx

ignore-rules:
- regex_injection_dos
- pug_jade_template

severity-filter:
- WARNING
- ERROR Suppress Findings You can suppress findings from javascript source files by adding the comment // njsscan-ignore: rule_id1, rule_id2 to the line that trigger the findings. Example: app.get('/some/redirect', function (req, res) {
var target = req.param("target");
res.redirect(target); // njsscan-ignore: express_open_redirect
}); CI/CD Integrations You can enable njsscan in your CI/CD or DevSecOps pipelines. Github Action Add the following to the file .github/workflows/njsscan.yml. name: njsscan
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
njsscan:
runs-on: ubuntu-latest
name: njsscan check
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: nodejsscan scan
id: njsscan
uses: ajinabraham/njsscan-action@master
with:
args: '.' Example: dvna with njsscan github action (https://github.com/ajinabraham/dvna/actions?query=workflow%3Anjsscan) Github Code Scanning Integration Add the following to the file .github/workflows/njsscan_sarif.yml. name: njsscan sarif
on:
push:
branches: [ master, main ]

___________________________
@hacking_Attack
@Hacking_Video
Top 10 API Bugs — Where To Find Them

Ladies and Gentlemen, let’s do some API hacking today. I will discuss some of the top 10 API bugs and where one can find them.Continue reading on Medium »
Read more...
Hacking Articles Tips Tricks Videos Tutorials
Photo
hacking: security in practice
A hacking group

Hey guys! I wanted to invite you guys to my discord server: https://discord.gg/bM8puuhH (just launched it a couple of days back). It is targeted at helping cybersec enthusiasts who are into bug bounty and other related fields. How? I'm trying to put tons of cybersec tools at a single place so that anyone can find tools you probably are unaware of. I'm currently putting resources on the group, so wait I'll be putting a whole lot more awesome tools to help you.

I'm no pro, but if we share information with each other we can grow together!

I'll be posting some internship opportunities at the internship channel if I find any.

You can contribute too by sharing resources which you think might be beneficial for the hacking community :)

And what's more, we encourage you to show your current projects and gather members for it!

Hope you have a cool time at our group. Feel free to DM me. I'll try to respond as soon as possible. I'm a bit busy with my college studies but I'll try to do best from my side.

Thanks.

submitted by /u/ultimate_smash
[link] [comments]

___________________________
@hacking_Attack
@Hacking_Video
hacking: security in practice
Hacking Via (What Appears to be) USB-C PD

I have been looking at getting a USB-C Power Deliver Charger so I can use my Macbook Pro in the car. Because USB-C can be used for more than just power delivery, like data extraction, installation of malicious code, etc it seems like what initially appears to be an innocent car charger could be much more. I found USB-C charger that has the power rating that I want on Amazon, but seeing where it's manufactured is giving me pause. Am I just being paranoid or is this a legitimate concern? Can someone who is familiar with this type of cybersecurity threat weigh in on the state of this type of exploit and how much risk is involved? After typing this message out I'm leaning toward just getting an inverter and plugging in my wall charger! Help they tryna get mah dataz!

submitted by /u/esdot
[link] [comments]

___________________________
@hacking_Attack
@Hacking_Video
hacking: security in practice
How to detect the RedLine stealer

Hey guys, I just wanted to ask a question regarding the RedLine stealer; the thing is that I am pretty sure it exists in the system that I am talking about, even though the ESET can't detect it. I am sure that it is in the system, as all the accounts whose passwords were saved in "Google" have been trying to be accessed even though MFA was enabled. The question is, how is it possible to detect the RedStealer as one of the powerful antiviruses didn't even have an idea about the stealer.

submitted by /u/rubenamizyan
[link] [comments]

___________________________
@hacking_Attack
@Hacking_Video