• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dlil_inject_if_input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlil_inject_if_input


  • Subject: Re: dlil_inject_if_input
  • From: Joshua Graessley <email@hidden>
  • Date: Fri, 17 Sep 2004 14:05:07 -0700


Are you doing the right thing with the TCP sequence and ack numbers?

-josh

On Sep 17, 2004, at 1:32 PM, Matthew Jaffa wrote:

Hi,

I have asked this question before, but didn't really get a response or maybe worded it horribly.
I'll give it another shot.


I have interecepted an outgoing HTTP request using a dlil interface filter. I return EJUSTRETURN in the dlil_if_output function to let it know to not let this packet go out, but to still think it sent it out.

Now the problem is, is inserting my own HTTP/1.1 response into the input stream of the machine that made the request. What I am doing so far is taking the ip header and tcp header of the outgoing packet that was going to go out, and make my own tcp header and ip header, and switch the outgoing ipaddress with the source and also the tcp port numbers in the same way. then I add my data to the end off my tcp header, put that all in an mbuf and use dlil_inject_if_input to insert my packet to go up the protocol stacks so the web browser will now display my block page instead.

However it seems to not be working, dlil_inject_if_input returns 0 like it should but nothing is happening, no block page. Not even the packet that I inserted in the dlil_inject_if_input is showing up in my interface infilter function, anybody ever do this and have success of injecting there own page into the input stream for the browser to see.

I am doing the checksumming correct now for the ipheader and tcpheader, but still no results. When I call dlil_inject_if_input am I supposed to have a ethernet header on the mbuf I am injecting??? That might be the problem, but don't know.

thanks,
Matt


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: dlil_inject_if_input
      • From: Matt Jaffa <email@hidden>
References: 
 >dlil_inject_if_input (From: "Matthew Jaffa" <email@hidden>)

  • Prev by Date: dlil_inject_if_input
  • Next by Date: Re: dlil_inject_if_input
  • Previous by thread: dlil_inject_if_input
  • Next by thread: Re: dlil_inject_if_input
  • Index(es):
    • Date
    • Thread