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
  1. Home
  2. General Programming
  3. C#
  4. How To Capture and alter the incoming packets from my connection

How To Capture and alter the incoming packets from my connection

Scheduled Pinned Locked Moved C#
sysadmintutorialquestion
6 Posts 2 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.
  • S Offline
    S Offline
    spiritboy
    wrote on last edited by
    #1

    hi there , i have 1 internet connection(Public connection) and 1 LAN connection(Private Connection) i want to capture all incoming packets from both connections at the network layer and alter some of its fields such as source ip, source port, dest. port and dest. ip. i know i should use low level sockets to read all incoming packets at network layer! but how to do that? any one know?

    L 1 Reply Last reply
    0
    • S spiritboy

      hi there , i have 1 internet connection(Public connection) and 1 LAN connection(Private Connection) i want to capture all incoming packets from both connections at the network layer and alter some of its fields such as source ip, source port, dest. port and dest. ip. i know i should use low level sockets to read all incoming packets at network layer! but how to do that? any one know?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Using C# : SharpPcap - A packet capture framework for .NET[^] Using Wireshark : http://www.wireshark.org/[^]

      S 1 Reply Last reply
      0
      • L Lost User

        Using C# : SharpPcap - A packet capture framework for .NET[^] Using Wireshark : http://www.wireshark.org/[^]

        S Offline
        S Offline
        spiritboy
        wrote on last edited by
        #3

        I knew these libraries , they are all about monitoring analizing and sniffing the network packets! i need a way to alter these packets and resend them! these won't help me.

        L 1 Reply Last reply
        0
        • S spiritboy

          I knew these libraries , they are all about monitoring analizing and sniffing the network packets! i need a way to alter these packets and resend them! these won't help me.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I don't think it's possible using C#. What do you want with that ? Do you want to modified packet ? I don't think it's a good idea.

          S 1 Reply Last reply
          0
          • L Lost User

            I don't think it's possible using C#. What do you want with that ? Do you want to modified packet ? I don't think it's a good idea.

            S Offline
            S Offline
            spiritboy
            wrote on last edited by
            #5

            but it's some times a good idea! do u know about NAT server? it changes the Packet's spurce ip address and port! providing port translation! i am trying to create a custom NAT! so i need to change Packet's fields accordingly

            L 1 Reply Last reply
            0
            • S spiritboy

              but it's some times a good idea! do u know about NAT server? it changes the Packet's spurce ip address and port! providing port translation! i am trying to create a custom NAT! so i need to change Packet's fields accordingly

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              yes I know, but it runs on kernel mode. you must write the code in C, like WinPCap. It's not possible creating it directly using C#.

              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