Likes Likes:  0
Resultaten 1 tot 6 van de 6
Geen
  1. #1
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Possible windows+python bug



    This bug is produced on WindowsXP SP1 (OSVer : 5_1_2600) with Python2.3 installed.

    Start Python and type (of course x.x.x.x should be replaced with IP address):

    import socket
    s=socket.socket(socket.AF_INET,socket.SOCK_RAW,4)
    s.sendto("",("x.x.x.x",0))

    Press ENTER and your win box should crash immediately.
    On my test after restart windows returned BCCode : d1.

    By the way, IP protocol 0x04 is "IP over IP", and I could send such datagrams month ago with Python (although Microsoft has crippled some protocols).
    Now, this is maybe specific to this configuration, or it could be due to some driver (BCCode: d1 is specific for drivers related problems). It needs further testing on different configurations.

  2. #2
    Neil Schemenauer
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Possible windows+python bug

    On Tue, Mar 22, 2005 at 12:21:18PM -0000, liquid@cyberspace.org wrote:
    > Start Python and type (of course x.x.x.x should be replaced with
    > IP address):
    >
    > import socket
    > s=socket.socket(socket.AF_INET,socket.SOCK_RAW,4)
    > s.sendto("",("x.x.x.x",0))
    >
    > Press ENTER and your win box should crash immediately.


    I tested this on WinXP SP2 with Python 2.4. The result is an
    exception:

    socket.error: (10022, 'Invalid argument')

    I don't have Python 2.3 installed otherwise I would test that too.

    Neil

  3. #3
    azurIt
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Possible windows+python bug



    > On Tue, Mar 22, 2005 at 12:21:18PM -0000, liquid@cyberspace.org=20

    wrote:
    > > Start Python and type (of course x.x.x.x should be replaced with
    > > IP address):
    > >=20
    > > import socket
    > > s=3Dsocket.socket(socket.AF_INET,socket.SOCK_RAW,4 )
    > > s.sendto("",("x.x.x.x",0))
    > >=20
    > > Press ENTER and your win box should crash immediately.

    >=20
    > I tested this on WinXP SP2 with Python 2.4. The result is an
    > exception:
    >=20
    > socket.error: (10022, 'Invalid argument')
    >=20
    > I don't have Python 2.3 installed otherwise I would test that too.
    >=20
    > Neil
    >=20



    i got the same exception, WinXP SP2, Python 2.3.4 .

    azurIt
    =0A_______________________________________________ ________________________=
    =0Ahttp://www.epi.sk Ekonomicke a pravne informacie - denne aktualizovane.=
    =0AZakony, sutaze, udaje o firmach, odborne clanky...=0ANajdete na stranke =
    http://www.epi.sk/info1.htm=0A

  4. #4
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Possible windows+python bug

    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?

  5. #5
    Kinnell
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: Possible windows+python bug

    Anyone have a Win 2003 box they can test this on?


    On Tue, 22 Mar 2005 23:05:51 +0100, azurIt <azurit@pobox.sk> wrote:
    >
    >
    > > On Tue, Mar 22, 2005 at 12:21:18PM -0000, liquid@cyberspace.org

    > wrote:
    > > > Start Python and type (of course x.x.x.x should be replaced with
    > > > IP address):
    > > >
    > > > import socket
    > > > s=socket.socket(socket.AF_INET,socket.SOCK_RAW,4)
    > > > s.sendto("",("x.x.x.x",0))
    > > >
    > > > Press ENTER and your win box should crash immediately.

    > >
    > > I tested this on WinXP SP2 with Python 2.4. The result is an
    > > exception:
    > >
    > > socket.error: (10022, 'Invalid argument')
    > >
    > > I don't have Python 2.3 installed otherwise I would test that too.
    > >
    > > Neil
    > >

    >
    > i got the same exception, WinXP SP2, Python 2.3.4 .
    >
    > azurIt
    >
    > __________________________________________________ _____________________
    > http://www.epi.sk Ekonomicke a pravne informacie - denne aktualizovane.
    > Zakony, sutaze, udaje o firmach, odborne clanky...
    > Najdete na stranke http://www.epi.sk/info1.htm
    >
    >


  6. #6
    Peter Oswald
    Possible windows+python bug
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    RE: Possible windows+python bug

    Perhaps the disabling of raw sockets in SP2 is the cause of this problem.
    Try this.

    Net stop SharedAccess

    Then try running the Python code and see if it still crashes.

    Afterwards you can restart the SharedAccess service. Cheers.

    -----Original Message-----
    From: azurIt [mailto:azurit@pobox.sk]
    Sent: Tuesday, March 22, 2005 5:06 PM
    To: bugtraq@securityfocus.com
    Subject: Re: Possible windows+python bug



    > On Tue, Mar 22, 2005 at 12:21:18PM -0000, liquid@cyberspace.org

    wrote:
    > > Start Python and type (of course x.x.x.x should be replaced with
    > > IP address):
    > >
    > > import socket
    > > s=socket.socket(socket.AF_INET,socket.SOCK_RAW,4)
    > > s.sendto("",("x.x.x.x",0))
    > >
    > > Press ENTER and your win box should crash immediately.

    >
    > I tested this on WinXP SP2 with Python 2.4. The result is an
    > exception:
    >
    > socket.error: (10022, 'Invalid argument')
    >
    > I don't have Python 2.3 installed otherwise I would test that too.
    >
    > Neil
    >



    i got the same exception, WinXP SP2, Python 2.3.4 .

    azurIt

    __________________________________________________ _____________________
    http://www.epi.sk Ekonomicke a pravne informacie - denne aktualizovane.
    Zakony, sutaze, udaje o firmach, odborne clanky...
    Najdete na stranke http://www.epi.sk/info1.htm


Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics