packet

Is it possible to send tcp syn packet with payload by using WFP?

谁说我不能喝 提交于 2019-12-24 17:15:17
问题 I am new to Windows Filtering Platform. Is it possible to send a tcp SYN packet with a payload by using WFP? The payload I want to send will have some secret password. My linux server will check SYN packet's payload whether it is valid or not. 回答1: Although sending data in SYN packet is possible, it is never recommended to send sensitive data. Any "bad user" who intercepts the SYN packet shall be able to initiate a connection with your secret password. 回答2: WFP or no WFP, you "can" send the

Does windows TCP stack sends ACK when the packet is received by the kernel or after the socket read?

做~自己de王妃 提交于 2019-12-24 05:28:50
问题 I understand that in most UNIX based systems, as soon as the kernel receives the packet it sends the ACK. But would like to know if the behavior is same in windows operating system too. (Windows 7). 回答1: The behaviour is the same in all operating systems. It is defined by RFC 793. ACK is performed when (or, in the case of a delayed ACK, after) the data is received by TCP. It has nothing to do with when the application reads. 来源: https://stackoverflow.com/questions/21442462/does-windows-tcp

Caching packets captured from pcap

試著忘記壹切 提交于 2019-12-23 17:25:02
问题 This is a follow-up question to this: Rebuilding a packet to inject via pcap What I want to accomplish: functionA: Capture packets with pcap. Modify source/destination addresses. Recalculate checksums. Inject with pcap. functionB: Create two threads. Thread 1 sends a magic packet to wake sleeping client. Thread 2 captures packets with pcap and caches the packets into an array of u_char *'s, since pcap puts the packet data serially into "u_char * packet". When both threads terminate, I then

Get raw packet data from Qt application

◇◆丶佛笑我妖孽 提交于 2019-12-23 16:41:02
问题 I was searching for a method to access & tamper the raw packet data sent and received by a Qt application but could not find anything. Is there any method? Or if not the application at least a method to access the packet data from a QWebView. Is there any method to achieve any of the above two? 回答1: I'm sorry, Sam, I cannot make it work. I've been trying everything I can imagine, but nothing goes as it would have been desired. Let's make a short list of options and what can and cannot be done

How can the “packet” option of socket in Erlang accelerate the tcp transmission so much?

天大地大妈咪最大 提交于 2019-12-23 09:57:15
问题 It takes only 8 seconds to transfer 1G data through two different ports on localhost using {packet,4}, while the same task can't be finished within 30 seconds using {packet,raw}. I know if use the latter method, the data will arrive in tens of thousands small pieces (on archlinux the size is 1460 bytes). I've learned some aspects of TCP/IP protocol and have been thinking about this question for days but still can't figure out what is the EXACT difference. Sincerely look forward to some bottom

not getting all ICMP time-exceeded messages: why?

巧了我就是萌 提交于 2019-12-23 09:37:28
问题 I'm using Scapy to replay some dumped packets in which I change the TTL value. I've been getting very odd results even with TTL=1. When I run my test hours apart from each other, I can get from roughly 40% to 95% of packets replied to with an ICMP time-exceeded message. Then I can recursively replay unanswered packets and get each time more or less the same percentage of answered packets as before. Why is that? I've been sending packets with an interval of 0.1 seconds between each other. This

C++ UDP sockets packet queuing

流过昼夜 提交于 2019-12-21 18:05:14
问题 I am using the same UDP socket for sending and receiving data. I am wondering if packet queuing for DGRAM sockets is already present, or do we have to handle it separately. If the user code has to handle queueing, how is it done? Do we have separate threads to recvfrom for the socket and put the packet in the reciver_queue and to sendto from another sending_queue? An example code will be absolutely awesome. Thanks for your help. 回答1: There is a packet queue. However when the packet queue is

How to debug packet loss?

谁说我不能喝 提交于 2019-12-21 14:13:03
问题 I wrote a C++ application (running on Linux) that serves an RTP stream of about 400 kbps. To most destinations this works fine, but some destinations expericence packet loss. The problematic destinations seem to have a slower connection in common, but it should be plenty fast enough for the stream I'm sending. Since these destinations are able to receive similar RTP streams for other applications without packet loss, my application might be at fault. I already verified a few things: - in a

Adding payload in packet

不打扰是莪最后的温柔 提交于 2019-12-21 09:12:31
问题 Can I insert image or document (in MBs) as a data in packet using scapy? This is what I did to send data. data = "University of texas at San Antonio" a = IP(dst="129.132.2.21")/TCP()/data send(a) 回答1: Yes, you can send raw data like this. In this example, data will be ASCII encoded. >>> data = 'University of Texas at San Antonio' >>> a = IP(dst='129.132.2.21') / TCP() / Raw(load=data) >>> sendp(a) 来源: https://stackoverflow.com/questions/6605118/adding-payload-in-packet

Encryption with AES algorithm in Java

梦想与她 提交于 2019-12-21 06:41:40
问题 I made a packet p, with some integers and boolean values. The packet is as follows: TCPPacket p=new TCPPacket(481,516,23,42,true,false,false,false,false,false,false,false,10,10); How can I encrypt the packet with AES, in Java? 回答1: I suggest you read through the tutorial Using AES with Java Technology from Oracle. (First hit on Google btw.) 回答2: This is some sample code that should get you started. It uses AES (128) to crypt and decrypt an object (using SealedObject). public class App {