Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
hi I have linux router with 2 interface eth0 connect to internet eth1 connect to lan and i want to capture all the packets that outgoing from eth1 (which connect ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    15

    Unhappy packet modify

    hi

    I have linux router with 2 interface
    eth0 connect to internet
    eth1 connect to lan
    and i want to capture all the packets that outgoing from eth1 (which connect to lan)
    then modify all packets and then sent them to lan

    i want to do that by using c lang

    any one can help me please??????????

    thanks

  2. #2
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30

    Lightbulb

    Quote Originally Posted by reta View Post
    hi

    I have linux router with 2 interface
    eth0 connect to internet
    eth1 connect to lan
    and i want to capture all the packets that outgoing from eth1 (which connect to lan)
    then modify all packets and then sent them to lan

    i want to do that by using c lang

    any one can help me please??????????

    thanks
    Hi, i dont know much about this.
    You can access ethernet buffer to get raw packet's.
    try to understand how tcpdump or wireshark is getting the raw packets from the ethernet buffer that may help you.

  3. #3
    Just Joined!
    Join Date
    Nov 2009
    Posts
    15
    HI jayasekar.k

    I DON'T WANT TO CAPTURE PACKETS ONLY BUT WANT TO MODIFY IT AND THAT'S THE PROBLEM
    IF I USE RAW SOCKET THEN I CAN'T STOP THE PACKETS IN KERNAL I JUST GET A COPY OF THE PACKETS AND WHEN I SEND MY MODIFICATION PACKET THEN THE PACKET WILL SEND TWICE :THE ORGINAL PACKET AND THE MODIFICATION PACKET

    SO I NEED A WAY TO GET THE ORIGINAL PACKET NOT A COPY OF IT

    HOW TO DO THAT ????

    PLEASE HELP ME

  4. #4
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30
    hi reta, It look's like we have to do something with kernel.
    Iam started working on this issue. i will let u know abt my result.
    if you found the answer plz post it.

  5. #5
    Just Joined!
    Join Date
    Nov 2009
    Posts
    15
    Quote Originally Posted by jayasekar.k View Post
    hi reta, It look's like we have to do something with kernel.
    Iam started working on this issue. i will let u know abt my result.
    if you found the answer plz post it.

    hi again

    Iam pleased to hear that you start to work on this issue...
    of course I will let you know if i get any result , and I will wait your result.

  6. #6
    Just Joined!
    Join Date
    Jan 2010
    Posts
    2
    Hi jayasekar.k and reta,
    I am also working on packet modification. Additionally, I will have to check for specific packet format before packet modification. If any of you get any idea of how to do the modification then please do share.

    Regards,
    Kishwar.

  7. #7
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30

    Thumbs up

    Quote Originally Posted by gerrard_116 View Post
    Hi jayasekar.k and reta,
    I am also working on packet modification. Additionally, I will have to check for specific packet format before packet modification. If any of you get any idea of how to do the modification then please do share.

    Regards,
    Kishwar.
    Hi Kishwar, For packet modification, you should know the protocol format and checksum calculation for that protocol. if you are good in that you can modify any packet.

  8. #8
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30
    hi reta, hv u got any solutions.
    Now iam started to analyse the kernel source code. on how it sends data to the network card. what about your status, ???

    regards
    jayasekar
    jayasekar.k@gmail.com

  9. #9
    Just Joined!
    Join Date
    Nov 2009
    Posts
    15

    Lightbulb

    Quote Originally Posted by jayasekar.k View Post
    hi reta, hv u got any solutions.
    Now iam started to analyse the kernel source code. on how it sends data to the network card. what about your status, ???

    regards
    jayasekar
    jayasekar.k@gmail.com

    Hi jayasekar.k

    Finally I got this result ,You can capture >modify>reinject the packets using libipq library.

    If you find diffrent result please post it.

    Good luck
    Reta

  10. #10
    Just Joined!
    Join Date
    Oct 2008
    Posts
    30
    i know it is silly to ask you, i googled it , i dont get the proper result.
    where can we download "libipq library for C", i found libipq for php but i cant found one for c

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...