Commit Graph

45 Commits

Author SHA1 Message Date
James 8c538fa065
optimized the sort_loops in module.py and also improved readability (#1150)
Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2025-10-12 21:59:53 +00:00
einsibjarni 0fa6c156e3
Allow running on FreeBSD 13.*, 14.* and 15.* (#1136)
* Allow running on FreeBSD 13.*, 14.* and 15.*

* Update code

---------

Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
2025-09-14 17:31:15 +00:00
Achintya Jai e934f748ee
adding new output types (#1085)
* sarif fully done, dd.json little left

* This is good to go now

* pre-commit fixes

* updated

* removing redundancy and less i/o operations

* ruff fixes

* fixed tests for Path.open

* rabbit suggestions

* added relevant documentation

* slight change in doc

* removing empty files that were added by mistake

* updated datatime format according to coderabbit's suggestions
2025-09-07 18:22:29 +00:00
Achintya Jai a373e23c28
changed nettacker's data directory naming (#1100)
* changed nettacker's data directory naming

* migration from .data to .nettacker

* ruff fixes

* documentation update
2025-08-11 19:47:13 +00:00
Achintya Jai 9a0006ea42
Feature: Exclude certain ports from being scanned (#1099)
* feature: exclude certain ports from being scanned

* ruff fixes

* handling exception for vulnerablility modules

* not relying on try and except

* updated documentation, changed flag

* test case for module file

* update test

* mocking the database calls, that's probably the issue

* removed breaking test for now

* coderabbit suggested change, minor code refactoring

* ruff fixes

---------

Signed-off-by: Achintya Jai <153343775+pUrGe12@users.noreply.github.com>
2025-07-27 08:11:53 +00:00
Achintya Jai e450c819d8
[feature] add custom headers for http requests via CLI and remove sensitive headers before adding it to the database (#1107)
* [feature] add custom headers for http requests via CLI. Removes sensitive info before logging in the database

* better help message

* input validation - coderabbit changes

* ruff fixes

* allow for header chaining with multiple -H flags and for complex headers involving comma separated values

* test case for http.py that include using headers. Added pytest-asyncio for the same

* ruff fixes

* formatting changes suggested by coderabbit

* docs update

* correct usage and en.yaml file
2025-07-26 20:30:05 +00:00
Achintya Jai 7cbf897e30
handle OSError if port not present in /etc/services (#1093)
* handle unknown ports in /etc/services

* ruff fix

* Update code

---------

Co-authored-by: Arkadii Yakovets <arkadii.yakovets@owasp.org>
2025-07-09 14:04:30 +00:00
Packet Phantom 958e1bc075
feature: add smb_brute command (#1070)
* Update dependencies in poetry.lock and pyproject.toml for new packages

* feat: add SMB brute force module

* feat: add unit tests for SMB brute force module

* ran make pre-commit

---------

Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2025-06-09 15:49:15 +00:00
Achintya Jai 10c95512e6
Refactoring Ip.py to return proper boolean values (#1043)
* added bool to netaddr instances, removed redundant imports

* created test file for ip.py

* refactoring ip.py
2025-05-27 22:02:59 +00:00
Packet Phantom 75fc06bd31
Handle socket.gaierror when retrieving server certificate (#1069) 2025-05-08 21:30:48 +00:00
Packet Phantom 9bdb94039c
refactor: use class attribute for SSH and Telnet client instantiation (#1068) 2025-05-08 00:34:32 +00:00
Achintya Jai 3f214b76cf
Implementing logging response_dependent conditions in socket.py (#1060)
* logging matched services along with output from tcp_connect_send_and_recieve

* fixed tests

* fixed module.py
2025-04-27 22:18:11 +00:00
Achintya Jai f62da6a605
added clean exit for missing wordlists (#1047)
Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2025-03-18 12:42:37 +00:00
dyp4r cb1a011c13
Fix issues in telent.py located in core/lib (#1048)
Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2025-03-18 10:28:33 +00:00
Achintya Jai 2667369af0
Custom wordlist functionality addition for scan modules (#1026)
* adding default loop policy for asyncio

* added custom wordlist functionality

* lint fix

* bug fixes

* added break after first detection to exit for loop

* removed custom read from brute scans because its already implemented there

* updated according to suggested changes

* cleared old code

* fixed lint

* made requested changes

* made suggested changes

* lint fix

* changed user_wordlist to read_from_file
2025-03-07 11:40:16 +00:00
Achintya Jai 65192c8fc6
Added base path for directory enumeration (#1019)
* added base path addition functionality

* fixed ruff

* unbound variable fix

---------

Co-authored-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2025-02-21 21:33:02 +00:00
Achintya Jai c0962bcd9d
adding default loop policy for asyncio (#1020) 2025-02-20 21:31:26 +00:00
tanaydin sirin 9aaa7033a5
Correct the issue with port scanner output (#978)
The issue caused the program to erroneously run a regex pattern on HTML content instead of the request data. This was because the port number wasn't displayed in the HTML's body content. The commit rectifies this problem, ensuring that regex operates on the correct data.
2024-12-22 12:34:12 +00:00
Arkadii Yakovets 5f6bc8e0b3
Remove `numpy` dependency (#947)
* Refactor code for future `numpy` removal

* Remove `numpy` dependency

* Update dependencies
2024-11-05 18:38:42 +00:00
Arkadii Yakovets 1391affeb4
Refactor code for future `numpy` removal (#946) 2024-10-27 16:40:44 +00:00
Sam Stepanyan efa2c4df94 reformat 2024-09-26 08:09:38 +01:00
Sam Stepanyan 14933497e9 adding "-d" as a shortcut for "--skip-service-discovery" with relevant Usage documentation update 2024-09-26 07:59:20 +01:00
Sam Stepanyan 9b89749389
Update app.py
minor formatting issue 

Signed-off-by: Sam Stepanyan <sam.stepanyan@owasp.org>
2024-09-21 02:35:32 +01:00
Sam Stepanyan 987d4c3ed1 ScanID added to CLI and HTML report for easy identification of results 2024-09-21 02:30:26 +01:00
Sam Stepanyan 6c68fb91a4
Merge branch 'master' into sam_dirb 2024-09-19 23:11:55 +01:00
Sam Stepanyan a86b9095fd dir_scan module 2024-09-19 23:08:19 +01:00
Arkadii Yakovets 763e998437
Update code 2024-09-17 16:32:56 -07:00
Arkadii Yakovets 6ffbf882cc
Apply suggestions from code review
Signed-off-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
2024-09-17 16:28:06 -07:00
Captain-T2004 97c4f99bb9 Reverted back the results to results_dir directory(.data/results)
Now the comparison results are stored as report_compare_{date_time}_{scan_id}... in the default results_dir
2024-09-16 08:31:47 +05:30
Captain-T2004 9ffa45978e Fix file path handeling 2024-09-13 21:17:15 +05:30
Captain-T2004 d94f11860a CodeQL recommended changes 2024-09-11 21:05:09 +05:30
Akshay Behl 10fd8afd68
Merge branch 'master' into CREATE_SCAN_COMPARE 2024-09-11 18:48:57 +05:30
Arkadii Yakovets a397fa9e4b
Implement `nettacker` command 2024-09-05 09:44:03 -07:00
Captain-T2004 97eb4f9c4c Made suggested changes
1. changed the date format from "%Y/%m/%d" to "%Y-%m-%d" to make it ANSI and ISO 8601 compliant.

2. Changed the issuer and subject to issuer_str and subject_str which are formatted string from the x509 objects.

3. Added subject to  ssl_expired_certificate_vuln and ssl_expiring_certificate_scan modules
2024-09-01 18:03:29 +05:30
Captain-T2004 e47ef52929 Made changes following suggestion
1. Change the date format from d/m/Y to Y-m-d (e.g. 2004-08-28)

2. In the return/output of ssl_certificate_scan in SSL library please  add certificate "subject" and "issuer" so these could be logged

3. Rename ssl_version module to ssl_weak_version

4. Change ssl_expired_certificate module to return expired certs only ( do not count expiring_soon certs - it is not a vulnerability!)

5. Create a separate ssl_expiring_certificate module in modules/scan (remember  'expiring soon'  is not a vulnerability, so we need to make this a 'scan' module)

6. Rename ssl_signed_certificate module to ssl_certificate_weak_signature and remove the self-signed check from it

7. Create a separate ssl_self_signed_certificate module in modules/vuln

Next in  nettacker/core/lib/ssl.py
 in class SslLibrary(BaseLibrary): you have ssl_certificate_scan and ssl_version_and_cipher_scan methods.
 There is a common code in these two methods so these could be refactored to remove the repetition.  Please refactor/improve this.
 In ssl_version_and_cipher_scan also please add add  to the output /return certificate "subject" ,"issuer" and an expiry date.
 This way if a user scans they network using IP addresses and some servers will come up with weak SSL versions/ciphers it will be easier for user to identify the servers using the certificate subject/issuer
2024-08-31 02:42:15 +05:30
Akshay Behl 5518b140f6
Apply suggestions from code review
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Signed-off-by: Akshay Behl <126911424+Captain-T2004@users.noreply.github.com>
2024-08-31 02:35:38 +05:30
Akshay Behl 64b9457a8f
Update nettacker/core/lib/ssl.py
Co-authored-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Signed-off-by: Akshay Behl <126911424+Captain-T2004@users.noreply.github.com>
2024-08-27 01:15:33 +05:30
Captain-T2004 de4e02c2b1 Added Scan Compare feature 2024-08-26 04:02:07 +05:30
Captain-T2004 e8f57c1d16 Added SSL/TLS Modules 2024-08-25 19:49:53 +05:30
Arkadii Yakovets 44bd2ab7cd
Run scan in a separate thread when started via API 2024-08-23 17:45:01 -07:00
Arkadii Yakovets 310938b6cf
Simplify module fuzzer config syntax 2024-08-21 08:39:37 -07:00
Arkadii Yakovets 560d94aced
Improve module configuration compatibility 2024-08-20 09:12:08 -07:00
Arkadii Yakovets 335c6cd7ee
Clean up code 2024-08-19 16:52:09 -07:00
Arkadii Yakovets 030c0adf22
Whitelist fuzzers for paths/URLs 2024-08-19 16:44:10 -07:00
Arkadii Yakovets 8a64187048
Change the entry point name/location
As per request by Sam Stepanyan
2024-08-11 11:31:18 -07:00