日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
Windows下的滲透測試之提權(quán)的基本套路(上)

從t0到t3 - 信息搜集

創(chuàng)新互聯(lián)一直秉承“誠信做人,踏實做事”的原則,不欺瞞客戶,是我們最起碼的底線! 以服務(wù)為基礎(chǔ),以質(zhì)量求生存,以技術(shù)求發(fā)展,成交一個客戶多一個朋友!為您提供成都網(wǎng)站設(shè)計、網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)、成都網(wǎng)頁設(shè)計、小程序制作、成都網(wǎng)站開發(fā)、成都網(wǎng)站制作、成都軟件開發(fā)、重慶APP開發(fā)公司是成都本地專業(yè)的網(wǎng)站建設(shè)和網(wǎng)站設(shè)計公司,等你一起來見證!

一開始,我們擁有的帳號是一個沒有特權(quán)的普通賬號。假設(shè)我們已經(jīng)在遠(yuǎn)程或者在本地利用EXP進(jìn)行了一次攻擊并且獲得了一個反彈回來的shell。根本上說,在時間t0,我們不知道被攻擊的機(jī)器是做什么的,它和誰進(jìn)行連接,我們擁有怎樣的權(quán)限,甚至它的操作系統(tǒng)是哪個。

因此,開始的時候,我們就需要快速的搜集一些至關(guān)重要的信息,這樣我們就可以了解一下我們所處環(huán)境的情況。

首先,先看看我們連接的什么類型的操作系統(tǒng)

 
 
 
 
  1. C:\Windows\system32> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
  2. OS Name:                   Microsoft Windows 7 Professional
  3. OS Version:                6.1.7601 Service Pack 1 Build 7601

注:中文環(huán)境下,"OS Name"為"OS 名稱","OS Version"為"OS 版本"

接著,看下計算機(jī)名和我們使用的用戶

 
 
 
 
  1. C:\Windows\system32> hostname
  2. b33f
  3. C:\Windows\system32> echo %username%
  4. user1

現(xiàn)在我們有了基本的信息,接下來我們可以列出計算機(jī)上的其它用戶,并且可以看一下我們當(dāng)前用戶的詳細(xì)信息。從下面的結(jié)果可以看出,user1不是本地用戶組Administrators的成員。

 
 
 
 
  1. C:\Windows\system32> net users
  2. User accounts for \\B33F
  3. -------------------------------------------------------------------------------
  4. Administrator            b33f                     Guest
  5. user1
  6. The command completed successfully.
  7. C:\Windows\system32> net user user1
  8. User name                    user1
  9. Full Name
  10. Comment
  11. User's comment
  12. Country code                 000 (System Default)
  13. Account active               Yes
  14. Account expires              Never
  15. Password last set            1/11/2014 7:47:14 PM
  16. Password expires             Never
  17. Password changeable          1/11/2014 7:47:14 PM
  18. Password required            Yes
  19. User may change password     Yes
  20. Workstations allowed         All
  21. Logon script
  22. User profile
  23. Home directory
  24. Last logon                   1/11/2014 8:05:09 PM
  25. Logon hours allowed          All
  26. Local Group Memberships      *Users
  27. Global Group memberships     *None
  28. The command completed successfully.

這是我們暫時需要了解的關(guān)于用戶的所有信息。接下來我們需要從網(wǎng)絡(luò)方面搜集信息了。

首先,看一下網(wǎng)絡(luò)連接和路由表。

 
 
 
 
  1. C:\Windows\system32> ipconfig /all
  2. Windows IP Configuration
  3.    Host Name . . . . . . . . . . . . : b33f
  4.    Primary Dns Suffix  . . . . . . . :
  5.    Node Type . . . . . . . . . . . . : Hybrid
  6.    IP Routing Enabled. . . . . . . . : No
  7.    WINS Proxy Enabled. . . . . . . . : No
  8. Ethernet adapter Bluetooth Network Connection:
  9.    Media State . . . . . . . . . . . : Media disconnected
  10.    Connection-specific DNS Suffix  . :
  11.    Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
  12.    Physical Address. . . . . . . . . : 0C-84-DC-62-60-29
  13.    DHCP Enabled. . . . . . . . . . . : Yes
  14.    Autoconfiguration Enabled . . . . : Yes
  15. Ethernet adapter Local Area Connection:
  16.    Connection-specific DNS Suffix  . :
  17.    Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
  18.    Physical Address. . . . . . . . . : 00-0C-29-56-79-35
  19.    DHCP Enabled. . . . . . . . . . . : Yes
  20.    Autoconfiguration Enabled . . . . : Yes
  21.    Link-local IPv6 Address . . . . . : fe80::5cd4:9caf:61c0:ba6e%11(Preferred)
  22.    IPv4 Address. . . . . . . . . . . : 192.168.0.104(Preferred)
  23.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  24.    Lease Obtained. . . . . . . . . . : Saturday, January 11, 2014 3:53:55 PM
  25.    Lease Expires . . . . . . . . . . : Sunday, January 12, 2014 3:53:55 PM
  26.    Default Gateway . . . . . . . . . : 192.168.0.1
  27.    DHCP Server . . . . . . . . . . . : 192.168.0.1
  28.    DHCPv6 IAID . . . . . . . . . . . : 234884137
  29.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-18-14-24-1D-00-0C-29-56-79-35
  30.    DNS Servers . . . . . . . . . . . : 192.168.0.1
  31.    NetBIOS over Tcpip. . . . . . . . : Enabled
  32. C:\Windows\system32> route print
  33. ===========================================================================
  34. Interface List
  35.  18...0c 84 dc 62 60 29 ......Bluetooth Device (Personal Area Network)
  36.  13...00 ff 0c 0d 4f ed ......TAP-Windows Adapter V9
  37.  11...00 0c 29 56 79 35 ......Intel(R) PRO/1000 MT Network Connection
  38.   1...........................Software Loopback Interface 1
  39.  16...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
  40.  15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter \#2
  41.  19...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter \#3
  42.  14...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
  43. ===========================================================================
  44. IPv4 Route Table
  45. ===========================================================================
  46. Active Routes:
  47. Network Destination        Netmask          Gateway       Interface  Metric
  48.           0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.104     10
  49.         127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
  50.         127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  51.   127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  52.       192.168.0.0    255.255.255.0         On-link     192.168.0.104    266
  53.     192.168.0.104  255.255.255.255         On-link     192.168.0.104    266
  54.     192.168.0.255  255.255.255.255         On-link     192.168.0.104    266
  55.         224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
  56.         224.0.0.0        240.0.0.0         On-link     192.168.0.104    266
  57.   255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  58.   255.255.255.255  255.255.255.255         On-link     192.168.0.104    266
  59. ===========================================================================
  60. Persistent Routes:
  61.   None
  62. IPv6 Route Table
  63. ===========================================================================
  64. Active Routes:
  65.  If Metric Network Destination      Gateway
  66.  14     58 ::/0                     On-link
  67.   1    306 ::1/128                  On-link
  68.  14     58 2001::/32                On-link
  69.  14    306 2001:0:5ef5:79fb:8d2:b4e:3f57:ff97/128
  70.                                     On-link
  71.  11    266 fe80::/64                On-link
  72.  14    306 fe80::/64                On-link
  73.  14    306 fe80::8d2:b4e:3f57:ff97/128
  74.                                     On-link
  75.  11    266 fe80::5cd4:9caf:61c0:ba6e/128
  76.                                     On-link
  77.   1    306 ff00::/8                 On-link
  78.  14    306 ff00::/8                 On-link
  79.  11    266 ff00::/8                 On-link
  80. ===========================================================================
  81. Persistent Routes:
  82.   None

arp -A 展示了ARP緩存表.

 
 
 
 
  1. C:\Windows\system32> arp -A
  2. Interface: 192.168.0.104 --- 0xb
  3.   Internet Address      Physical Address      Type
  4.   192.168.0.1           90-94-e4-c5-b0-46     dynamic
  5.   192.168.0.101         ac-22-0b-af-bb-43     dynamic
  6.   192.168.0.255         ff-ff-ff-ff-ff-ff     static
  7.   224.0.0.22            01-00-5e-00-00-16     static
  8.   224.0.0.251           01-00-5e-00-00-fb     static
  9.   224.0.0.252           01-00-5e-00-00-fc     static
  10.   239.255.255.250       01-00-5e-7f-ff-fa     static
  11.   255.255.255.255       ff-ff-ff-ff-ff-ff     static

下面可以看到活動的網(wǎng)絡(luò)連接和防火墻規(guī)則

 
 
 
 
  1. C:\Windows\system32> netstat -ano
  2. Active Connections
  3.   Proto  Local Address          Foreign Address        State           PID
  4.   TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       684
  5.   TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  6.   TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING       4
  7.   TCP    127.0.0.1:5354         0.0.0.0:0              LISTENING       1400
  8.   TCP    192.168.0.104:139      0.0.0.0:0              LISTENING       4
  9.   TCP    [::]:135               [::]:0                 LISTENING       684
  10.   TCP    [::]:445               [::]:0                 LISTENING       4
  11.   TCP    [::]:5357              [::]:0                 LISTENING       4
  12.   UDP    0.0.0.0:5355           *:*                                    1100
  13.   UDP    0.0.0.0:52282          *:*                                    976
  14.   UDP    0.0.0.0:55202          *:*                                    2956
  15.   UDP    0.0.0.0:59797          *:*                                    1400
  16.   UDP    127.0.0.1:1900         *:*                                    2956
  17.   UDP    127.0.0.1:65435        *:*                                    2956
  18.   UDP    192.168.0.104:137      *:*                                    4
  19.   UDP    192.168.0.104:138      *:*                                    4
  20.   UDP    192.168.0.104:1900     *:*                                    2956
  21.   UDP    192.168.0.104:5353     *:*                                    1400
  22.   UDP    192.168.0.104:65434    *:*                                    2956
  23.   UDP    [::]:5355              *:*                                    1100
  24.   UDP    [::]:52281             *:*                                    976
  25.   UDP    [::]:52283             *:*                                    976
  26.   UDP    [::]:55203             *:*                                    2956
  27.   UDP    [::]:59798             *:*                                    1400
  28.   UDP    [::1]:1900             *:*                                    2956
  29.   UDP    [::1]:5353             *:*                                    1400
  30.   UDP    [::1]:65433            *:*                                    2956
  31.   UDP    [fe80::5cd4:9caf:61c0:ba6e%11]:1900  *:*                      2956
  32.   UDP    [fe80::5cd4:9caf:61c0:ba6e%11]:65432  *:*                     2956

接下來的兩個netsh命令是不能在所有操作系統(tǒng)都通用的命令的例子,netsh firewall命令只能在XP SP2及其以上版本的操作系統(tǒng)使用。

 
 
 
 
  1. C:\Windows\system32> netsh firewall show state
  2. Firewall status:
  3. -------------------------------------------------------------------
  4. Profile                           = Standard
  5. Operational mode                  = Enable
  6. Exception mode                    = Enable
  7. Multicast/broadcast response mode = Enable
  8. Notification mode                 = Enable
  9. Group policy version              = Windows Firewall
  10. Remote admin mode                 = Disable
  11. Ports currently open on all network interfaces:
  12. Port   Protocol  Version  Program
  13. -------------------------------------------------------------------
  14. No ports are currently open on all network interfaces.
  15. C:\Windows\system32> netsh firewall show config
  16. Domain profile configuration:
  17. -------------------------------------------------------------------
  18. Operational mode                  = Enable
  19. Exception mode                    = Enable
  20. Multicast/broadcast response mode = Enable
  21. Notification mode                 = Enable
  22. Allowed programs configuration for Domain profile:
  23. Mode     Traffic direction    Name / Program
  24. -------------------------------------------------------------------
  25. Port configuration for Domain profile:
  26. Port   Protocol  Mode    Traffic direction     Name
  27. -------------------------------------------------------------------
  28. ICMP configuration for Domain profile:
  29. Mode     Type  Description
  30. -------------------------------------------------------------------
  31. Enable   2     Allow outbound packet too big
  32. Standard profile configuration (current):
  33. -------------------------------------------------------------------
  34. Operational mode                  = Enable
  35. Exception mode                    = Enable
  36. Multicast/broadcast response mode = Enable
  37. Notification mode                 = Enable
  38. Service configuration for Standard profile:
  39. Mode     Customized  Name
  40. -------------------------------------------------------------------
  41. Enable   No          Network Discovery
  42. Allowed programs configuration for Standard profile:
  43. Mode     Traffic direction    Name / Program
  44. -------------------------------------------------------------------
  45. Enable   Inbound              COMRaider / E:\comraider\comraider.exe
  46. Enable   Inbound              nc.exe / C:\users\b33f\desktop\nc.exe
  47. Port configuration for Standard profile:
  48. Port   Protocol  Mode    Traffic direction     Name
  49. -------------------------------------------------------------------
  50. ICMP configuration for Standard profile:
  51. Mode     Type  Description
  52. -------------------------------------------------------------------
  53. Enable   2     Allow outbound packet too big
  54. Log configuration:
  55. -------------------------------------------------------------------
  56. File location   = C:\Windows\system32\LogFiles\Firewall\pfirewall.log
  57. Max file size   = 4096 KB
  58. Dropped packets = Disable
  59. Connections     = Disable

最后,我們大概的看一下計算機(jī)上的:計劃任務(wù),正在運(yùn)行的進(jìn)程,啟動的服務(wù),安裝的驅(qū)動程序。

這條命令將詳細(xì)的展示出所有的計劃任務(wù):

 
 
 
 
  1. C:\Windows\system32> schtasks /query /fo LIST /v
  2. Folder: \Microsoft\Windows Defender
  3. HostName:                             B33F
  4. TaskName:                             \Microsoft\Windows Defender\MP Scheduled Scan
  5. Next Run Time:                        1/22/2014 5:11:13 AM
  6. Status:                               Ready
  7. Logon Mode:                           Interactive/Background
  8. Last Run Time:                        N/A
  9. Last Result:                          1
  10. Author:                               N/A
  11. Task To Run:                          c:\program files\windows defender\MpCmdRun.exe Scan -ScheduleJob
  12.                                       -WinTask -RestrictPrivilegesScan
  13. Start In:                             N/A
  14. Comment:                              Scheduled Scan
  15. Scheduled Task State:                 Enabled
  16. Idle Time:                            Only Start If Idle for 1 minutes, If Not Idle Retry For 240 minutes
  17. Power Management:                     No Start On Batteries
  18. Run As User:                          SYSTEM
  19. Delete Task If Not Rescheduled:       Enabled
  20. Stop Task If Runs X Hours and X Mins: 72:00:00
  21. Schedule:                             Scheduling data is not available in this format.
  22. Schedule Type:                        Daily
  23. Start Time:                           5:11:13 AM
  24. Start Date:                           1/1/2000
  25. End Date:                             1/1/2100
  26. Days:                                 Every 1 day(s)
  27. Months:                               N/A
  28. Repeat: Every:                        Disabled
  29. Repeat: Until: Time:                  Disabled
  30. Repeat: Until: Duration:              Disabled
  31. Repeat: Stop If Still Running:        Disabled
  32. [..Snip..]

下面的這條命令將正在運(yùn)行的進(jìn)程和該進(jìn)程啟動的服務(wù)列了出來:

 
 
 
 
  1. C:\Windows\system32> tasklist /SVC
  2. Image Name                     PID Services
  3. ========================= ======== ============================================
  4. System Idle Process              0 N/A
  5. System                           4 N/A
  6. smss.exe                       244 N/A
  7. csrss.exe                      332 N/A
  8. csrss.exe                      372 N/A
  9. wininit.exe                    380 N/A
  10. winlogon.exe                   428 N/A
  11. services.exe                   476 N/A
  12. lsass.exe                      484 SamSs
  13. lsm.exe                        496 N/A
  14. svchost.exe                    588 DcomLaunch, PlugPlay, Power
  15. svchost.exe                    668 RpcEptMapper, RpcSs
  16. svchost.exe                    760 Audiosrv, Dhcp, eventlog,
  17.                                    HomeGroupProvider, lmhosts, wscsvc
  18. svchost.exe                    800 AudioEndpointBuilder, CscService, Netman,
  19.                                    SysMain, TrkWks, UxSms, WdiSystemHost,
  20.                                    wudfsvc
  21. svchost.exe                    836 AeLookupSvc, BITS, gpsvc, iphlpsvc,
  22.                                    LanmanServer, MMCSS, ProfSvc, Schedule,
  23.                                    seclogon, SENS, ShellHWDetection, Themes,
  24.                                    Winmgmt, wuauserv
  25. audiodg.exe                    916 N/A
  26. svchost.exe                    992 EventSystem, fdPHost, netprofm, nsi,
  27.                                    WdiServiceHost, WinHttpAutoProxySvc
  28. svchost.exe                   1104 CryptSvc, Dnscache, LanmanWorkstation,
  29.                                    NlaSvc
  30. spoolsv.exe                   1244 Spooler
  31. svchost.exe                   1272 BFE, DPS, MpsSvc
  32. mDNSResponder.exe             1400 Bonjour Service
  33. taskhost.exe                  1504 N/A
  34. taskeng.exe                   1556 N/A
  35. vmtoolsd.exe                  1580 VMTools
  36. dwm.exe                       1660 N/A
  37. explorer.exe                  1668 N/A
  38. vmware-usbarbitrator.exe      1768 VMUSBArbService
  39. TPAutoConnSvc.exe             1712 TPAutoConnSvc
  40. [..Snip..]
 
 
 
 
  1. C:\Windows\system32> net start
  2. These Windows services are started:
  3.    Application Experience
  4.    Application Information
  5.    Background Intelligent Transfer Service
  6.    Base Filtering Engine
  7.    Bluetooth Support Service
  8.    Bonjour Service
  9.    COM+ Event System
  10.    COM+ System Application
  11.    Cryptographic Services
  12.    DCOM Server Process Launcher
  13.    Desktop Window Manager Session Manager
  14.    DHCP Client
  15.    Diagnostic Policy Service
  16.    Diagnostic Service Host
  17.    Diagnostic System Host
  18.    Distributed Link Tracking Client
  19.    Distributed Transaction Coordinator
  20.    DNS Client
  21.    Function Discovery Provider Host
  22.    Function Discovery Resource Publication
  23.    Group Policy Client
  24. [..Snip..]

這有時是有用的,一些第三方驅(qū)動程序,即使是有信譽(yù)的公司,也可能有比瑞士奶酪上的孔還多的的漏洞。這僅僅是有可能的,因為對ring0攻擊在大多數(shù)人專業(yè)技能之外。

 
 
 
 
  1. C:\Windows\system32> DRIVERQUERY
  2. Module Name  Display Name           Driver Type   Link Date
  3. ============ ====================== ============= ======================
  4. 1394ohci     1394 OHCI Compliant Ho Kernel        11/20/2010 6:01:11 PM
  5. ACPI         Microsoft ACPI Driver  Kernel        11/20/2010 4:37:52 PM
  6. AcpiPmi      ACPI Power Meter Drive Kernel        11/20/2010 4:47:55 PM
  7. adp94xx      adp94xx                Kernel        12/6/2008 7:59:55 AM
  8. adpahci      adpahci                Kernel        5/2/2007 1:29:26 AM
  9. adpu320      adpu320                Kernel        2/28/2007 8:03:08 AM
  10. AFD          Ancillary Function Dri Kernel        11/20/2010 4:40:00 PM
  11. agp440       Intel AGP Bus Filter   Kernel        7/14/2009 7:25:36 AM
  12. aic78xx      aic78xx                Kernel        4/12/2006 8:20:11 AM
  13. aliide       aliide                 Kernel        7/14/2009 7:11:17 AM
  14. amdagp       AMD AGP Bus Filter Dri Kernel        7/14/2009 7:25:36 AM
  15. amdide       amdide                 Kernel        7/14/2009 7:11:19 AM
  16. AmdK8        AMD K8 Processor Drive Kernel        7/14/2009 7:11:03 AM
  17. AmdPPM       AMD Processor Driver   Kernel        7/14/2009 7:11:03 AM
  18. amdsata      amdsata                Kernel        3/19/2010 9:08:27 AM
  19. amdsbs       amdsbs                 Kernel        3/21/2009&nbs
    分享文章:Windows下的滲透測試之提權(quán)的基本套路(上)
    當(dāng)前URL:http://www.5511xx.com/article/ccopsoj.html