Brew Nmap



  • Install Homebrew. /usr/bin/ruby -e '$(curl -fsSkL raw.github.com/mxcl/homebrew/go)' We need to.
  • Language English. Linuxbrew nmap Addeddate 2021-04-07 23:56:11 Identifier linuxbrew-nmap Scanner Internet Archive Python library 1.9.4.

$ brew install nmap Find local IP in Mac OS X: System Preference Network, should be like 10.0.0.x or 192.168.x.x. Find devices connected to the same Wifi network.

What Is Homebrew?

Homebrew for OS X is a command line program manager, similar in functionality to “apt-get” found in some Linux distributions. By itself, Homebrew offers a user the ability to install (and update) a good number command line programs for Unix. When the “cask” option is used, the user has access to over 3800 Mac OS X GUI programs that can be installed and updated. With the “mas” option, the user can download and update programs from the Apple App Store. The Homebrew developer’s describe Homebrew very concisely: “Homebrew installs the stuff you need that Apple didn’t.”

How To Install Homebrew:

Installing Homebrew is pretty simple. Copy and paste the following string, at a Terminal prompt.:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

Press the “Return” key and Homebrew begins installing. It will setup some new files change some permissions. Homebrew will check and see if Xcode is installed, if not, it will automatically install the Xcode Command Line Tool package. After a few additional mechanizations, Homebrew itself will be downloaded and installed.

How To Install Homebrew Cask:

Cask is included in most current distributions of Homebrew. If “cask” is not available to you, you can get it by placing this string at the command prompt in your terminal:

How to Install Mas:

To install “mas” from the command line prompt, type:

brew install mas

Examples – Homebrew:

Once installed, check to see if Homebrew is working:

Update Homebrew:

brew update

View installed programs needing updated:

Update Homebrew and installed programs:

brew upgrade

Upgrade only the program named nmap:

To search for all Google apps available from Homebrew:

brew search google

Download and install a program called “nmap”:

Remove the program “nmap”:

brew remove nmap

Show what Homebrew programs are installed:

By default, Homebrew does not uninstall old versions of a program. To see what would be cleaned up:

brew cleanup -n

To remove old versions:

Examples – Homebrew-Cask:

Strings for Homebrew-Cask are identical to those of Homebrew with the exception that the word “cask” directly follows “brew” in each string. For example, here is the string for installing Google Earth Pro:

Brew Get Nmap

brew cask install google-earth-pro

Brew Nmap

Examples – Mas:

List of all the apps installed.

Shows all apps with pending updates.

mas outdated

Updates all the apps. The example above show no apps are available for updating.

App name searches for an app in the App Store. You’ll want to make a note of the application identifier number if you want to install it.

mas search

Application number installs that app (see graphic).

Sources

Homebrew homepage | https://brew.sh

How To Install Packages with Homebrew for OS X | https://www.howtogeek.com/211541/homebrew-for-os-x-easily-installs-desktop-apps-and-terminal-utilities

Homebrew Cask homepage | https://caskroom.github.io

Mas Updates and Installs Mac Apps from the App Store Apps from the Command Line | https://lifehacker.com/mas-updates-and-installs-mac-app-store-apps-from-the-co-1791919584

Update (December 3, 2020): If you are experiencing this problem, please share your frustration on the Ubiquiti Community.

Quickfix: Disable Endpoint Scanner

  1. Browse to your UniFi dashboard.

  2. Scroll down to Internet Security → Network Scanners.

  3. Disable Endpoint Scanner.

Wasting toner, ink, and paper

This isn’t necessarily a photography tip but most studios and offices have workhorse printers for administrative tasks. We bought our HP Color LaserJet CP2025dn over a decade ago in 2008 and it’s been dutifully cranking away without a hitch ever since. That is until I upgraded Hamor Photography’s Internet firewall from a Ubiquiti UniFi Security Gateway (USG) to a Ubiquiti UniFi Dream Machine Pro (UDM-Pro).

And then like clockwork our trusty workhorse started emptying our paper tray by spitting out infinite garbage text every night:

The behavior severely annoyed my wife whenever she went to print her USPS shipping labels. The printer would immediately start printing queued garbage text if she refilled the paper tray without shutting the printer off and then back on again.

For me this wasn’t really a big deal because I could mitigate the problem by either turning the printer off overnight or by leaving by the printer tray empty. But I recognized these strings as scans from Nmap: the Network Mapper.

So my primary concern was how were security scans, sometimes used by hackers to detect and attack vulnerable computer servers, getting past my brand new firewall and entering my network.

Brew For Mac

And what if a large-format photographic printer that costs tens or hundreds of dollars per page started exhibiting this behavior? It could quickly bankrupt a photography or graphic design studio in this already troubling economic climate.

Reproducing the behavior

Just to confirm that the garbage text was indeed caused by Nmap I ran an Nmap scan myself. I installed Nmap on my MacBook Pro 16” using Homebrew and ran a scan against the printer myself.

A few minutes later the paper tray was empty with pages of the same garbage text I’d been seeing every evening. So now the task at hand was to figure out where the rogue nightly scan was coming from.

Isolating and confirming the behavior

My first assumption was that something on my network may have been opening up external Internet access to my printer via UPnP. But no unexpected UPnP ports were mapped. Then, as I started digging through the UniFi Dashboard for Port Forwarding configuration, I remembered that I enabled a Threat Management feature called Endpoint Scanner.

The purpose of Endpoint Scanner is to show what services are running on every device on your internal network. And Ubiquiti must be using Nmap to implement this functionality!

So, to confirm my suspicions, I logged into my UniFi Dream Machine Pro using SSH and ran tcpdump. And waited.

Sure enough, that evening tcpdump confirmed that the firewall itself was running Nmap against the printer and was using the same text that was being printed.

And the timestamp on the Endpoint Scan Data aligned with the time that tcpdump detected the Nmap scan.

“Solving” the problem

  1. Browse to your UniFi dashboard.

  2. Scroll down to Internet Security → Network Scanners.

  3. Disable Endpoint Scanner.

I applaud Ubiquiti for implementing the Endpoint Scanner. But the feature is still in Alpha and can cause serious problems with printers. And the reason “solving” is in quotes is because this isn’t a problem with the Endpoint Scanner itself. It’s a long-standing issue with most printers.

While searching for answers I found countless posts over the past decade complaining about nmap causing garbage text to print. Most printers are designed to accept and print any data that is sent to them. So, when Endpoint Scanner runs nmap against a printer, the printer will print. Or, if a printer is directly connected to the Internet and a hacker scans it with nmap, it will print. Just as it was designed to do.

Since this is just how printers work there should be an Endpoint Scanner feature implemented to lists hosts you don’t want to scan. Or, since Endpoint Scanner determines the device is a printer after the first scan, the UniFi Dashboard could automatically configure itself to not fully scan that MAC address again.

So, until Ubiquiti addresses this issue, I’ll be disabling Endpoint Scanner and will only enable it temporarily when I know that all my printers are turned off.