Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. portscandetector

portscandetector

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ask_you
    wrote on last edited by
    #1

    can anyone give me an idea about how to develop a portscandetector??

    T H 2 Replies Last reply
    0
    • A ask_you

      can anyone give me an idea about how to develop a portscandetector??

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      here is your idea first create a socket connection using CSocket or CAsyncSocket in mFC or use core Socket api's now check each port in computer. if you socket connected to that port mean the port is open else it is not.:) I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

      G 1 Reply Last reply
      0
      • A ask_you

        can anyone give me an idea about how to develop a portscandetector??

        H Offline
        H Offline
        Henry miller
        wrote on last edited by
        #3

        If you want to check for someone port scanning your machine you open a bunch of ports on your machine where nothing is running. If something hits several of them you know you are beind port scanned. More complex is to listen for all packets, and decode the raw packets. Look for connection attempts, and if you see multipul connections you know you are being port scanned. The hard part is telling the difference between acidental connections to your machine (someone who intended a different machine but typed the wrong address), and a port scan. Portscanners may run with several machines over a long time, hoping the port scan will not trip your detector instead it looks like the former.

        A 1 Reply Last reply
        0
        • H Henry miller

          If you want to check for someone port scanning your machine you open a bunch of ports on your machine where nothing is running. If something hits several of them you know you are beind port scanned. More complex is to listen for all packets, and decode the raw packets. Look for connection attempts, and if you see multipul connections you know you are being port scanned. The hard part is telling the difference between acidental connections to your machine (someone who intended a different machine but typed the wrong address), and a port scan. Portscanners may run with several machines over a long time, hoping the port scan will not trip your detector instead it looks like the former.

          A Offline
          A Offline
          ask_you
          wrote on last edited by
          #4

          Can u suggest me an algorithm to do so.. i know the basics of detection. just watching on closed ports is also a type of ports can detection but it gives lots of false positives.. i need some advances level help..

          H 1 Reply Last reply
          0
          • A ask_you

            Can u suggest me an algorithm to do so.. i know the basics of detection. just watching on closed ports is also a type of ports can detection but it gives lots of false positives.. i need some advances level help..

            H Offline
            H Offline
            Henry miller
            wrote on last edited by
            #5

            Not myself. Google around, I know there are open source programs that attempt to do this. Read their code. (but watch the license)

            1 Reply Last reply
            0
            • T ThatsAlok

              here is your idea first create a socket connection using CSocket or CAsyncSocket in mFC or use core Socket api's now check each port in computer. if you socket connected to that port mean the port is open else it is not.:) I Think It will Work Alok Gupta visit me at http://www.thisisalok.tk

              G Offline
              G Offline
              gamitech
              wrote on last edited by
              #6

              yes but what if the ports do not accept all connections gabby

              T 1 Reply Last reply
              0
              • G gamitech

                yes but what if the ports do not accept all connections gabby

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                ok i agree with you inthis topic. yeah it possible that if the port don't allow to connect we can't do any thing i think i have to work on it thanks for suggestion I Think It will Work ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups