網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告_第1頁(yè)
網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告_第2頁(yè)
網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告_第3頁(yè)
網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告_第4頁(yè)
網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告_第5頁(yè)
已閱讀5頁(yè),還剩2頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、網(wǎng)絡(luò)安全實(shí)驗(yàn)報(bào)告 姓名:楊瑞春 班級(jí):自動(dòng)化86 學(xué)號(hào):08045009 實(shí)驗(yàn)一:網(wǎng)絡(luò)命令操作與網(wǎng)絡(luò)協(xié)議分析 一.實(shí)驗(yàn)?zāi)康模?1. 熟悉網(wǎng)絡(luò)基本命令的操作與功能。 2. 熟練使用網(wǎng)絡(luò)協(xié)議分析軟件ethereal分析應(yīng)用協(xié)議。 二.實(shí)驗(yàn)步驟: 1.網(wǎng)絡(luò)命令: Ping tracert n etstat ipc onfig tel net n etcat Arp route n slookup Ssh 2. 協(xié)議分析軟件:ethereal的主要功能:設(shè)置流量過濾條件,分析網(wǎng)絡(luò)數(shù)據(jù)包, 流重組功能,協(xié)議分析。 三.實(shí)驗(yàn)任務(wù): 1 .跟蹤某一網(wǎng)站如google的路由路徑 2 .查看本機(jī)的MAC地址,i

2、p地址 輸入 ipconfig /all 找見本地連接. Description: SiS 900-Based PCI Fast Ethernet Adapte Physical Address. . : 00-13-8F-07-3A-57 DHCP Enabled: No Sub net Mask . 這項(xiàng)是網(wǎng)關(guān).也就是路由器IP Physical Address. . : 00-13-8F-07-3A-57 這項(xiàng)就是MAC地址了 . 3. tel net到linux服務(wù)器,執(zhí)行指定的命令 4. ssh連接到linux服務(wù)器,執(zhí)行指定的命令 5. nc應(yīng)用:tel net,綁定程序(cmd,

3、shell等),掃描,連接等。 6. 選擇任意一種應(yīng)用層協(xié)議如 www,ftp,qq等,利用ethereal對(duì)該協(xié)議進(jìn)行分 析。實(shí)驗(yàn)報(bào)告要求有ethereal捕獲的網(wǎng)絡(luò)流量和數(shù)據(jù)包協(xié)議解析的屏幕截圖。 7分析honeynet challenge datase的真實(shí)攻擊網(wǎng)絡(luò)流量 利用ethereal捕獲的網(wǎng)絡(luò)流量如下圖所示: 分析:從捕獲的網(wǎng)絡(luò)流量可以發(fā)現(xiàn),有許多的SYN信號(hào),但是TCK信號(hào)很少, 因此可以認(rèn)為三次握手沒有建立,連接失敗。 實(shí)驗(yàn)二:黑客攻擊技術(shù)實(shí)驗(yàn) 一.實(shí)驗(yàn)要求: 1. 掌握典型攻擊技術(shù)原理 2. 熟悉典型攻擊軟件的功能及操作 3. 分析黑客攻擊軟件執(zhí)行輸出結(jié)果 二實(shí)驗(yàn)內(nèi)容: 1

4、. namp 2. nessus 3. craft network packet: hping 4. crack password: john the ripper 5. web attack: nikto 6. google hacking tools 三實(shí)驗(yàn)任務(wù) 1 利用 winnmap 掃描功能,給出掃描報(bào)告及分析 2 nessus應(yīng)用,給出漏洞掃描報(bào)告 設(shè)置掃描策略 添加新掃描 掃描結(jié)果 掃描報(bào)告: 3. 執(zhí)行 nikto 對(duì) web 服務(wù)器進(jìn)行漏洞掃描。 4. john 應(yīng)用及配置 在 run 目錄下運(yùn)行 john-386 -wordlist=password.lst newxjtu

5、.txt ,對(duì) newxjtu.txt 中 內(nèi)容解密,會(huì)生成一個(gè).pot的文件,對(duì)同一密文只能解密一次,若刪除.pot文件, 可以再次解密。 破解后生成的明文為 $LM$9eceeb689e046fcd:NEWXJTU $LM$aad3b435b51404ee: 5. google hack ing tools 應(yīng)用 實(shí)驗(yàn)三:網(wǎng)絡(luò)安全技術(shù)實(shí)驗(yàn) 一實(shí)驗(yàn)要求: 1. 掌握防火墻,VPN,入侵檢測(cè)系統(tǒng)等安全技術(shù)的基本原理和實(shí)現(xiàn)過程 2. 熟悉IPSec SSL、Kerberos、PGP中的安全認(rèn)證協(xié)議關(guān)鍵技術(shù) 3. 熟練使用IPSec SSL、Kerberos、PGP等安全工具 二實(shí)驗(yàn)內(nèi)容: 1.

6、防火墻 2. VPN 3. IPSec 4. SSL 5. Kerberos 6. PGP 7. Snort 三實(shí)驗(yàn)任務(wù): 1.防火墻:利用個(gè)人防火墻軟件,定義防火墻規(guī)則,允許或是禁止某類網(wǎng)絡(luò)流量 的訪問。 2 .IPSec: windows自帶的IPSec服務(wù)配置及使用。搭建一個(gè) VPN,實(shí)現(xiàn)隧道模 式,傳輸模式等功能。 (1)、啟用xp的遠(yuǎn)程訪問組件, 該組件默認(rèn)不啟用。 打開服務(wù)services.msc,找到Routing and Remote Access 服務(wù),設(shè)置啟動(dòng)類型為自動(dòng),并啟動(dòng)服務(wù)。 (2) 、雙擊打開屬性,勾選“虛擬專用網(wǎng)”下的復(fù)選框。 打開“用戶頁(yè)” ,選擇允許遠(yuǎn)程撥入

7、的用戶,或者新建用戶。 打開網(wǎng)絡(luò)頁(yè),確保計(jì)算機(jī)上已經(jīng)安裝了 IPX/SPX 協(xié)議。服務(wù)器上設(shè)置完成。 、打開客戶機(jī),打開網(wǎng)上鄰居,單擊創(chuàng)建一個(gè)新的連接。點(diǎn)擊“下一步” 單擊“連接到我的工作場(chǎng)所的網(wǎng)絡(luò)” 單擊“虛擬專用網(wǎng)絡(luò)連接” 輸入公司名,單擊下一步 輸入VPN服務(wù)器的IP地址, 單擊完成客戶機(jī)創(chuàng)建連接完畢。 (5)、打開剛剛創(chuàng)建好的連接,輸入允許介入的用戶名和密碼,單擊“連接” 網(wǎng)絡(luò)連接后,客戶機(jī)成功接入XP VPN服務(wù)器 3.SSL: openSSL配置及使用 4. Kerberos: windows實(shí)現(xiàn)的kerberos認(rèn)證服務(wù)器配置及使用 5. PGP: GNUpgp 6.S nort

8、:定義變量,配置規(guī)則,定義新的規(guī)則,學(xué)習(xí)攻擊檢測(cè)規(guī)則及報(bào)警分析 在使用snort之前請(qǐng)先安裝 wireshark,因?yàn)闀?huì)用到其中的 winpcap : 1. 將snort安裝在C盤根目錄下。 2安裝完成后先把rules.rar解壓,將里面的文件全部直接放在下 3. 將snort.conf拷貝到bin目錄下 4. 在cmd中執(zhí)行snort的命令 Snort掃描到的端口 查看 snort.conf 實(shí)驗(yàn)四:網(wǎng)絡(luò)安全軟件開發(fā):網(wǎng)絡(luò)掃描器 一. 實(shí)驗(yàn)?zāi)康模?1. 熟悉網(wǎng)絡(luò)掃描器實(shí)現(xiàn)的關(guān)鍵技術(shù) 2. 熟練運(yùn)用C#,java開發(fā)網(wǎng)絡(luò)應(yīng)用程序 3. 熟悉網(wǎng)絡(luò)協(xié)議字段含義及結(jié)構(gòu) 二. 實(shí)驗(yàn)內(nèi)容: 1. 網(wǎng)絡(luò)掃

9、描器實(shí)現(xiàn)基本的地址掃描,端口掃描,TCP/UDP掃描,實(shí)現(xiàn)多線程掃描。 2. 圖形化界面的網(wǎng)絡(luò)掃描器軟件 3. 提交源代碼、可執(zhí)行程序及代碼注釋文件及執(zhí)行結(jié)果截圖。 三. 實(shí)驗(yàn)分析: 3232 多線程:電腦上有2個(gè)端口。如果只啟動(dòng)一個(gè)線程的話2個(gè)端口需要的時(shí)間可以用小時(shí) 計(jì)算。解決這個(gè)問題需要用到多線程原理。多線程實(shí)現(xiàn)可通過繼承Thread類或者實(shí)現(xiàn) Runnable接口來達(dá)到。 主機(jī)端口掃描: 與目標(biāo)主機(jī)創(chuàng)建 TCP連接,如果成功則說明端口監(jiān)聽中,同事對(duì)正在監(jiān)聽 的端口做識(shí)別操作!默認(rèn)按照常用端口服務(wù)給出提示!例如21,則提示ftp服務(wù)。UDP掃 描是向目標(biāo)主機(jī)端口發(fā)送固定字符,讀取目標(biāo)主機(jī)

10、回復(fù)內(nèi)容! TCP掃描原理:利用.Socket類建立socket連接,如果無法與指定的IP和端口建立 連接,將會(huì)拋出lOException。我們用try-catch對(duì)這個(gè)lOException異常進(jìn)行捕獲,以判斷 是否成功與指定的IP端口建立連接。如果成功建立了連接,說明指定IP的指定端口已經(jīng)開 放;如果程序拋出了一個(gè)Exception異常被我們捕獲,則說明指定的 IP沒有開放指定的 端口。掃描指定端口段則是利用循環(huán)不斷與服務(wù)器的指定端口進(jìn)行連接,供我們判斷是否開 放。 UDP掃描原理:這種方法使用的是 UDP協(xié)議。由于這個(gè)協(xié)議很簡(jiǎn)單,所以掃描變得相對(duì)比 較困難。這是由于打開的端口對(duì)掃描探測(cè)并

11、不發(fā)送一個(gè)確認(rèn),關(guān)閉的端口也并不需要發(fā)送一 個(gè)錯(cuò)誤數(shù)據(jù)包。幸運(yùn)的是,許多主機(jī)在你向一個(gè)未打開的UDP端口發(fā)送一個(gè)數(shù)據(jù)包時(shí),會(huì) 返回一個(gè)ICMP_PORT_UNREACH 錯(cuò)誤。這樣你就能發(fā)現(xiàn)哪個(gè)端口是關(guān)閉的。UDP和ICMP 錯(cuò)誤都不保證能到達(dá),因此這種掃描器必須還實(shí)現(xiàn)在一個(gè)包看上去是丟失的時(shí)候能重新傳 輸。這種掃描方法是很慢的,因?yàn)镽FC對(duì)ICMP錯(cuò)誤消息的產(chǎn)生速率做了規(guī)定。同樣,這 種掃描方法需要具有root 權(quán)限。利用 .DatagramSocket 類 ICMP_PORT_UNREACH 判斷IP地址和端口合法性:在得到端口和建立 socket之前一定要判斷IP地址和端口的合法 性,因

12、為端口的范圍是在165535,如果我們?nèi)ソ⒎秶舛丝诘倪B接就是沒必要的,而 且是不可行的。 圖形化界面(GUI )設(shè)計(jì):主要用到了 java.awt提供的和圖形界面相關(guān)的類。為了使界面更 美觀使用了 swing組件。 socket中的close方法:不需要一個(gè)socket的時(shí)候應(yīng)關(guān)閉它,因?yàn)?socket是一種有限的系統(tǒng) 資源。關(guān)閉socket將釋放有關(guān)的資源,并允許綁定在此socket上的端口被重新使用。Socket 被關(guān)閉之后就不能再向它收發(fā)數(shù)據(jù) UDP缺陷說明:開放的UDP端口并不需要送回 ACK包,而關(guān)閉的端口也不要求送回錯(cuò)誤 包(而本實(shí)驗(yàn)基于的原理就是那些主機(jī)在關(guān)閉的UDP端口會(huì)回

13、送ICMP Port Un reachable錯(cuò) 誤,因此有很大的幾率誤判,由于時(shí)間原因和自身知識(shí)的局限不能想到更好的方法),所以 利用UDP包進(jìn)行掃描非常困難。UDP包和ICMP包都是不可靠的,速度慢(差錯(cuò)報(bào)文產(chǎn)生 的速度有限制),并且需要root權(quán)限才能讀取ICMP消息,因此使用的局限性好大。 四實(shí)驗(yàn)結(jié)果: 1.初始界面: 2 對(duì)站點(diǎn)進(jìn)行TCP掃描: 3 對(duì)站點(diǎn)進(jìn)行UDP掃描: 實(shí)驗(yàn)源代碼: /*基于多線程端口掃描程序源代碼*/ import j rame; public class Scanner impleme nts Actio nListe ner /創(chuàng)建主窗口 public st

14、atic JFrame mainF rame = new JFrame(); public static Label labelIP = new Label(主機(jī) IP); public static Label labelPortStart = new Label(起始端口: ”); public static Label labelPortEnd = new Label(結(jié)束端口: ”); public static Label labelThread = new Label(線程數(shù):”); public static Label labelResult = new Label(掃描結(jié)果:

15、); public static Label State = new Label(掃描狀態(tài):”); public static Label Scanning = new Label( 未開始掃描 ); public static JTextField PortStart = new JTextField(0); public static JTextField PortE nd = new JTextField(100); public static JTextField ThreadNum = new JTextField(10); /文本區(qū)域,顯示掃描結(jié)果 public static Te

16、xtArea Result = new TextArea(); public static Label DLGINFO = new Label(); public static JButton Start = new JButt on (TCP 掃描); public static JButton Start2 = new JButton(UDP 掃描); public static JButton Exit = new JButton(退出); /錯(cuò)誤提示對(duì)話框 public static JDialog DLGError = new JDialog(mainFrame,令昔誤); publ

17、ic static JButton OK = new JButton(確定); public Scann er()/GUI 界面 /設(shè)置主窗體名稱 ma in Frame.setTitle(” 多線程端口掃描器”); /設(shè)置主窗體位置和大小 mainFrame.setBounds(180, 200, 550, 300); mai nF rame.addWi ndowListe ner(new Win dowAdapter() public void win dowClos in g(Wi ndowEve nt e) System.exit(0); ); / 設(shè)置錯(cuò)誤提示框 Container

18、dPanel = DLGError.getContentPane(); dPanel.setLayout(null); dPanel.add(DLGINFO); dPanel.add(OK); dPanel.setBackground(new Color(153,255,204); OK.setActionCommand(ok); OK.addActionListener(this); / 在主窗體中添加其他組件 mainFrame.setLayout(null); mainFrame.setResizable(false); mainFrame.add(Start); mainFrame.a

19、dd(Start2); mainFrame.add(Exit); mainFrame.add(labelIP); mainFrame.add(hostName); mainFrame.add(labelPortStart); mainFrame.add(labelPortEnd); mainFrame.add(PortStart); mainFrame.add(PortEnd); mainFrame.add(labelThread); mainFrame.add(ThreadNum); mainFrame.add(labelResult); mainFrame.add(Result); mai

20、nFrame.add(State); mainFrame.add(Scanning); / 設(shè)置掃描按鈕和退出按鈕 Start.setBounds(350, 232, 100, 30); Start.setActionCommand(Start); Start.addActionListener(this); Start.setBackground(new Color(153,255,204); Start2.setBackground(new Color(153,255,204); Start2.setBounds(250, 232, 100, 30); Start2.setActionCo

21、mmand(Start2); Start2.addActionListener(this); Exit.setBounds(475, 232, 60, 30); Exit.setActionCommand(Exit); Exit.addActionListener(this); Exit.setBackground(new Color(153,255,204); labelIP.setBounds(17, 13, 50, 20); hostName.setBounds(67, 10, 92, 25); hostName.setHorizontalAlignment(JTextField.CEN

22、TER); labelPortStart.setBounds(162, 13, 60, 20); PortStart.setBounds(227, 10, 45, 25); PortStart.setHorizontalAlignment(JTextField.CENTER); labelPortEnd.setBounds(292, 13, 60, 20); PortEnd.setBounds(357, 10, 45, 25); PortEnd.setHorizontalAlignment(JTextField.CENTER); labelThread.setBounds(422, 13, 5

23、0, 20); ThreadNum.setBounds(477, 10, 45, 25); ThreadNum.setHorizontalAlignment(JTextField.CENTER); labelResult.setBounds(1, 45, 55, 20); Result.setBounds(1, 65, 542, 160); Result.setEditable(false); Result.setBackground(new Color(204,255,51);/ 設(shè)置顯示結(jié)果窗口顏色 RGB State.setBounds(17, 232, 60, 30); Scannin

24、g.setBounds(80, 232, 120, 30); mainFrame.setVisible(true); public void actionPerformed(ActionEvent e) String cmd = e.getActionCommand();/得到明明處理事件 if(cmd.equals(Start)|cmd.equals(Start2) /啟動(dòng)掃描線程 try catch (UnknownHostException e1) DLGError.setBounds(300, 280, 160, 110); DLGINFO.setText( 錯(cuò)誤的 IP 地址 /域名

25、); DLGINFO.setBounds(25, 15, 100, 20); OK.setBounds(45, 40, 60, 30); DLGError.setVisible(true); return ; int minPort ; int maxPort ; int threadNum ; / 獲取輸入數(shù)據(jù) try minPort = Integer.parseInt(PortStart.getText(); maxPort = Integer.parseInt(PortEnd.getText(); threadNum = Integer.parseInt(ThreadNum.getTe

26、xt(); catch (NumberFormatException e1) DLGError.setBounds(300, 280, 299, 120); DLGINFO.setText( 錯(cuò)誤的端口號(hào)或線程數(shù)! 端口號(hào)和線程數(shù)必須為整 數(shù)!); DLGINFO.setBounds(10, 20, 280, 20); OK.setBounds(110, 50, 60, 30); DLGError.setVisible(true); return; / 輸入信息錯(cuò)誤處理 if(minPort 65535)|(minPort maxPort) DLGError.setBounds(300, 28

27、0, 295, 120); DLGINFO.setText( 最小端口必須是 0-65535 并且小于最大端口的整數(shù) ); DLGINFO.setBounds(10, 20, 280, 20); OK.setBounds(120, 50, 60, 30); DLGError.setVisible(true); return ; if(threadNum 200)| (threadNum 0) DLGError.setBounds(300, 280, 184, 120); DLGINFO.setText( 進(jìn)程數(shù)必須是 1-200 中的整數(shù) ); DLGINFO.setBounds(10, 20

28、, 200, 20); OK.setBounds(55, 50, 60, 30); DLGError.setVisible(true); return ; Result.append( 正 在 掃 描 + hostName.getText() + 線 程 數(shù) :+threadNum+n); Scanning.setText( 開始掃描 .); Result.append( 開始端口 + minPort + 結(jié)束端口 + maxPort + n); if(cmd.equals(Start)/ 啟動(dòng) TCP 掃描線程 for(int i = minPort;i = maxPort; ) if(i

29、+ threadNum) = maxPort) new Scan(i, i + threadNum).start(); i += threadNum; else new Scan(i, maxPort).start(); i += threadNum; else if(cmd.equals(Start2)/ 啟動(dòng) UDP 掃描線程 for(int i = minPort;i = maxPort; ) if(i + threadNum) = maxPort) new Scan2(i, i + threadNum).start(); i += threadNum; else new Scan2(i

30、, maxPort).start(); i += threadNum; try Thread.sleep(3000);/ 設(shè)置處理等待時(shí)間 catch (InterruptedException e1) e1.printStackTrace(); Result.append( 掃描完成 !n); Scanning.setText( 掃描完成! ); else if(cmd.equals(ok) DLGError.dispose(); else if(cmd.equals(Exit) System.exit(1); public static void main(String args) new

31、 Scanner(); /TCP Scan class class Scan extends Thread int maxPort, minPort; public static InetAddress hostAddress; Scan(int minPort, int maxPort) this.minPort = minPort; this.maxPort = maxPort; public void run() / 掃描指定端口 for(int i = minPort;i maxPort; i+) try / 根據(jù)主機(jī)名和端口號(hào)創(chuàng)建套接字地址。 SocketAddress sockaddr = new InetSocketAddress(hostAddress, i); Socket scans=new Socket(); int timeoutMs=50; / 將此套接字連接到具有指定超時(shí)值的服務(wù)器。 sc

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論