Solved

nmap scanner?

Posted on 2016-10-15
7
116 Views
Last Modified: 2016-11-13
nmap scanner?who knows how to scan port 3333-3392 not all open ports but only those who have RDP ?
thank you...
0
Comment
Question by:john lambert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 34

Expert Comment

by:ste5an
ID: 41845154
Use nmap -p 3333-3392 on the command line.
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41845155
something like this

nmap -PY3333-3392 a.b.d.d/mask | grep RDP
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41883428
requires to loop over nmap results and attempt a connection with a software that understands rdp

something like this scans ports properly on my own host.
i feel lazy grabbing the hostname with sed but it is rather trivial

nmap -p 3333-3392 localhost | sed -n 's:^\([0-9][0-9]*\).*:\1:p' | xargs -n 1 -I% sh -c 'xfreerdp -u tst -p tst --authonly localhost:% >/dev/null 2>/dev/null && echo "RDP listening on localhost:%" '
RDP listening on localhost:3389

Open in new window

0
SuperAntiSpyware Licenses Discounted by 25% !

Exclusive offer to Experts Exchange Members!
Buy SuperAntiSpyware License(s) from us and save 25% on the regular purchase price.
- Includes Full SuperAntiSpyware Vendor Support Entitlements
- Your Subscription does not begin until you activate your license
- Buy for your friends

 

Author Comment

by:john lambert
ID: 41884496
something for windows ?
0
 
LVL 27

Accepted Solution

by:
skullnobrains earned 500 total points
ID: 41884500
since you stated yourself that you already had figured the answer out, i'm wondering why you would ask.

you would need to code the equivalent in whatever language you are comfortable with. powershell has a few tools but parsing nmap's output seems complicated. you probably need to install either sed only and work it out in powershell, or rather script it in vb, perl, or even install cygwin or bash4unix ( or a similar shell ) and use the above code.

note that even the above code does not handle multiple hosts as-is. you'd need a second sed instruction
1
 

Author Closing Comment

by:john lambert
ID: 41884505
thank you........
0
 
LVL 27

Expert Comment

by:skullnobrains
ID: 41885428
feel free to post the final script for windows. i'm pretty sure it can be useful to others. if you manage something that works without installing extra tools, all the better.
0

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Determining the an SCCM package name from the Package ID
This article is a collection of issues that people face from time to time and possible solutions to those issues. I hope you enjoy reading it.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question