Pages

Friday, December 12, 2025

Fast Network Discovery

The Need for Speed in Network Scanning

In network administration and security testing, quickly identifying active hosts on a subnet is a frequent requirement. While advanced tools offer comprehensive analysis, sometimes a simple, command-line solution is needed for rapid inventory and troubleshooting. The goal is efficiency and minimal overhead.

The ipsweep.sh script, available on GitHub, is designed specifically for this purpose. It provides a lightweight, effective method for performing a ping sweep across a local network using only standard operating system utilities.

How This Script Accelerates Scanning

This specialized Bash script speeds up network discovery by utilizing parallel execution. Rather than checking network addresses one by one in sequence, the tool performs concurrent ping requests to every potential host within the specified subnet simultaneously. This method significantly reduces the time required for a complete network sweep.

Key Functions and Benefits:

*    Parallel Execution: By running checks in the background, the script drastically cuts down the total time required for the sweep, allowing for near-instantaneous discovery of live hosts.

*    Active Host Identification: The core function uses the standard ping command to send ICMP requests and identify which IP addresses are actively responding on the network.

*    Automatic Hostname Resolution: A critical utility feature is the inclusion of a reverse DNS lookup (nslookup) for every active IP. This translates cryptic IP addresses (e.g., 192.168.1.109) into human-readable hostnames (e.g., My-Workstation or router.local), greatly improving the utility of the scan results.

*    Low Dependency: The script relies only on utilities that are standard across most Unix-like environments (Linux, macOS): bash, ping, and nslookup.

Getting Started: Deploying the Script

To integrate ipsweep.sh into your toolkit, follow these straightforward steps:

1. Obtain the Script

The script can be obtained by cloning the Git repository:

git clone https://github.com/2bitninja/ipsweep.git

2. Prepare for Execution

Navigate to the repository directory and ensure the script has the correct permissions:

cd ipsweep
chmod +x ipsweep.sh

3. Execute the Scan

Run the script by supplying the first three octets of the target subnet (e.g., for the range 10.0.0.1 to 10.0.0.254):

./ipsweep.sh 10.0.0

The script will output a clean, two-column list detailing the active IP addresses and their resolved hostnames:

These are the active IP Address for 192.168.1
IP Adress Hostname
==========================
192.168.1.1    router.asus.com.
192.168.1.104    Samsung.
192.168.1.128
192.168.1.136
192.168.1.137     Joel.
192.168.1.143     MacBook-Pro.
192.168.1.169
192.168.1.211
192.168.1.36

Summary

ipsweep.sh is a valuable, minimalist tool for network auditing and troubleshooting. Its combination of speed, simplicity, and automatic hostname resolution makes it an efficient utility for anyone needing to quickly map out the active devices on a local network.

For further details and to view the source code, please visit the repository:

View the ipsweep repository on GitHub

Wednesday, December 10, 2025

Simplifying Tenable Administration: A Menu-Driven Utility for User Management

Managing a robust security infrastructure often means interacting with multiple administrative interfaces, and Tenable environments (Nessus and Tenable.sc) are no exception. Performing routine tasks like resetting a password or simply managing user access can become repetitive, especially in environments without seamless directory integration.

Crucially, when an administrator or standard user account gets locked out, gaining back immediate access can be a critical, high-stress scenario. This script offers a rapid solution for those situations.

To streamline these common administrative headaches, I developed the Tenable Utility, a simple, menu-driven Bash script designed to centralize and automate essential user management tasks for both Tenable.sc and Nessus.

Core Features of the Tenable Utility

The Tenable-Utility.sh script provides a clear, numbered menu system to execute privileged commands against your Tenable installations.

1. Quick Lock/Unlock: Quickly unlocking an administrator or standard user account.

2. Password Resets: Reset a Tenable.sc user's password to a known default value.

3. Add/Remove Users: (Nessus only) Add a new Nessus user or removing an existing one

Getting and Running the Script

Because this script performs administrative actions directly on the backend files of Tenable products, it must be run with the appropriate permissions.

Requirements:

- Tenable.sc and/or Nessus installed on a Linux or macOS system

- Root or sudo privileges.

Installation and Usage

1. Clone the Repository

> git clone https://github.com/2bitninja/Tenable-Utility.git
> cd Tenable-Utility

2. Grant Execution Rights

> chmod +x Tenable-Utility.sh

3. Execute and Select Options

Run the script using sudo. This will launch the interactive main menu

> sudo ./Tenable-Utility.sh

When executed, the script will display a menu that allows you to choose from various administrative options related to Tenable.sc and Nessus.

Menus

Tenable.sc User Management

After running the script, you'll be presented with a menu. Pick an option to perform the corresponding task:

------------------------------------------------
        What do you want to do?
1. Unlock admin account     | 4. Lock admin account
2. Unlock all accounts          | 5. Lock all accounts
3. Unlock one account         | 6. Lock one account
7. Reset user password      | 8. Manage Nessus accounts
9. Exit program


Nessus User Management Menu

If you select option 8, you'll enter the Nessus User Management menu where you can manage Nessus user accounts:

Nessus User Management
1. Add user        | 3. Change password
2. Remove user | 4. Exit


Conclusion

The Tenable Utility offers Tenable administrators a fast, reliable, and convenient way to handle crucial user management and operational tasks. Instead of navigating complex UIs or recalling lengthy command syntax, you can execute necessary changes from a single, simple menu.

If you are looking to simplify your daily administrative routine, check out the repository today and integrate this utility into your toolbox!

Tenable-Utility on GitHub

Feel free to check out the script, use it, and let me know if you have any suggestions for improvements!



Automating Verification for Nessus Scans

 The Challenge of Scan Verification

As vulnerability managers and security engineers we rely on credentialed scans to provide accurate visibility into our environment. An uncredentialed scan is essentially a surface-level check, missing most critical vulnerabilities that require authenticated access (like missing patches or insecure configurations).

When managing Tenable environments (Nessus or Tenable.sc), confirming that every asset in a large scan successfully ran with credentials is a critical, yet highly inefficient task. Since the definitive check demands manually reviewing Nessus Plugin ID 19506 (Nessus Scan Information) for the credentialed=true value on every host, this drill-down approach is simply too time-consuming.

The Solution: check-scans.sh

To solve this problem and reclaim time, I developed a simple Bash script called check-scans.sh.

This script automates the verification process, allowing vulnerability managers to confirm scan integrity quickly and efficiently without having to manually sift through the user interface.

The Script's Core Utility

The primary purpose of check-scans.sh is straightforward: verify that scans were conducted with credentials.

It targets the operational need to ensure that the foundational data used for patching and risk analysis is reliable. If Plugin 19506 is missing or shows credentialed=false, the script flags that asset, pointing you directly to the hosts that require re-scanning or troubleshooting.

How to Implement and Run the Script

The script is available in my GitHub repository. It requires minimal setup, making it easy to integrate into your existing workflow.

1. Getting the Script

You can find the source code and usage details here: https://github.com/2bitninja/check-scans

To get the script, clone the repository and navigate into the directory:

git clone https://github.com/2bitninja/check-scans.git

2. Prepare for Execution

Make the script executable:

chmod +x check-scans.sh

3. Running the Check

Due to the nature of interacting with the Nessus/Tenable installation directories and files, you will need elevated privileges (e.g., being in the tns group or using sudo) to execute it successfully.

Execute the script:

sudo ./check-scans.sh

The script will handle the heavy lifting, giving you an immediate, verifiable result of your credentialed scan coverage.

Conclusion

Operational efficiency in security is often achieved through small, focused automations. By leveraging a simple script like check-scans.sh, you eliminate a manual administrative burden, ensuring your security team can maintain a high standard of data quality for all vulnerability assessments.

Feel free to check out the script, use it, and let me know if you have any suggestions for improvements!

How does this version look? I focused on explaining the technical necessity and the workflow benefit.

Tuesday, May 6, 2025

How to Reset Passwords for Tenable.sc

Accidentally locked yourself out of your Tenable.sc (formerly Security Center) admin account? Don't worry! This post walks you through the steps to reset your password on version 5.11 and newer. If you're running an older version, you can find instructions in my previous blog post. We'll cover how to reset the password, unlock your account, and clear any pesky login failures.

Important Security Note: Directly modifying the database should be done with caution. Ensure you have a backup of your Security Center configuration before proceeding.

Reset the admin account password

root@earth# /opt/sc/support/bin/sqlite3 /opt/sc/application.db "update userauth set password = '943807ff8e7f4735e2a4774f0cf9ceec1044889088737759ef1f329beb40de00107446dffa66fdcc3d557c1b5109800b8f5083cd4e6cd018c5739135f9ceeb12', salt = 'e+xmTMivzO0Jmyl3XLcDIKcnXOWaKYzWCRRJu2ebr41K8sHJjtYy7JGJwR3IfohbFLUHWzVlivXtt8Dn/ok2tg==', hashtype = 2 where username='admin';"
This command resets the 'admin' user's password to 'password'. It's essential to log in and update this password right away. You can also use this command to reset the password of any other Tenable.sc user by replacing 'admin' with their username. This command does not unlock the account.

Clear Login Failures

root@earth# sqlite3 /opt/sc/application.db "update userauth set failedLogins='0' where username='admin';"
This command resets the count of failed login attempts for the 'admin' user or anther specified user.

Unlock the admin Account

root@earth# sqlite3 /opt/sc/application.db "update userauth set locked='0' where username='admin';"
Use this command to restore access to a locked 'admin' account. Note that this action only unlocks the account; the password remains the same.
 
After running these commands, you should now be able to log in to your Tenable.sc administrator account. Keep in mind that the password has been reset to a specific, secure value behind the scenes. For security, your very first step after logging in should be to change this password through the Tenable.sc interface. If you run into any problems or have more questions, please leave a comment below.

Note: A better way of doing account actions on Tenable.sc (security center), and Nessus is on this blog post: Simplifying Tenable Administration: A Menu-Driven Utility for User Management