安全应急响应(三)

一笑奈何 提交于 2020-03-29 17:25:48

Logprase

下载地址:

https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=24659

 

使用

Security Log

主要查看管理员登录时间段是否为正常时间
木马运行时间是否和管理员登录时间对应

1
LogParser -i:EVT -o DATAGRID "SELECT TimeGenerated as LoginTime,EXTRACT_TOKEN(Strings,5,'|') as username,EXTRACT_TOKEN(Strings,8,'|') as LogonType, EXTRACT_TOKEN(Strings,17,'|') as ProcessName, EXTRACT_TOKEN(Strings,18,'|') as SourceIP FROM Security where EventID=4624 AND TO_DATE(TimeGenerated) BETWEEN TIMESTAMP('2019-05-30','yyyy-MM-dd') and TIMESTAMP('2019-05-31','yyyy-MM-dd')"

System Log

主要查看服务名、服务路径

1
LogParser -i:EVT -o:DATAGRID "SELECT TimeWritten,EventID,EventType,EventTypeName,SourceName,EXTRACT_TOKEN(Strings,0,'|') as service_name,EXTRACT_TOKEN(Strings,1,'|') as service_path,Message from system WHERE TO_DATE(TimeGenerated) BETWEEN TIMESTAMP('2019-05-30','yyyy-MM-dd') AND TIMESTAMP('2019-05-31','yyyy-MM-dd')"

Application Log

主要查看程序运行时间

1
LogParser -i:EVT -o:DATAGRID "SELECT * FROM Application WHERE TO_DATE(TimeGenerated) BETWEEN TIMESTAMP('2019-05-30','yyyy-MM-dd') AND TIMESTAMP('2019-05-31','yyyy-MM-dd')"

WMIC

查看进程的命令行参数

1234567
wmic process get caption,commandline /value > tmp.txtwmic service list briefwmic process list briefwmic startup list brief//查看安装补丁和时间信息wmic qfe wmic qfe get Caption,Description,HotFixID,InstalledOn

DOS命令

dir

12345678
DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]/A 显示具有指定属性的文件   属性:D目录 R只读文件 H隐藏文件 A准备存档的文件    S系统文件 I无内容索引文件 L解析点 -表示“否”的前缀/S 显示指定目录及子目录中文件/W 用宽列表格式显示/P 显示满一屏暂停,按任意键后继续显示下一屏/Q 显示文件所有者

copy和xcopy

copy只能拷贝文件,不能拷贝文件夹
xcopy能拷贝文件夹及文件

12345
xcopy参数/S 复制目录和子目录,除了空目录/E 复制目录和子目录,包括空目录/C 忽略错误继续复制/H 复制隐藏和系统文件

del、deltree、rd

del 只能删除一个或者多个文件,不能删除文件夹

deltree 是一个外部命令,可以删除文件及文件夹,以及其子文件夹

rd 删除空文件夹,需要空文件夹的绝对路径

123
del 参数/s 递归删除文件夹及文件/q 不提示确认删除

move

移动一个或多个文件

12
/Y 若目标文件夹下有同名文件,忽略提示,直接覆盖原文件/-Y 提示警告

attrib

更改文件属性

1234567
attrib 参数+ 设置属性- 删除属性R 只读文件A 存档文件S 系统文件H 隐藏文件

netstat

查看网络连接、端口信息

12345678910111213
NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-t] [-v] [interval]-a 显示连接和监听端口-b 显示包含于创建每个连接或监听端口的可执行组件;需要权限-e 显示以太网统计信息-n 以数字形式显示地址和端口号-o 显示与每个连接相关的所属进程ID-p proto 显示指定协议的连接;可以是TCP、UDP、TCPv6、UDPv6-r 显示路由表-s 按协议显示统计信息-t 显示当前连接卸载状态-x 显示NetworkDirect连接、侦听器和共享终结点-y 显示所有连接TCP连接模板;无法与其他选项结合使用interval 重新显示选定的统计信息,各个显示间暂停的间隔秒数。按CTRL+C停止重新显示统计信息。

Linux的netstat

1234567891011121314151617181920212223242526272829303132333435
usage: netstat [-vWeenNcCF] [<Af>] -r         netstat {-V|--version|-h|--help}       netstat [-vWnNcaeol] [<Socket> ...]       netstat { [-vWeenNac] -i | [-cnNe] -M | -s [-6tuw] }        -r, --route              display routing table        -i, --interfaces         display interface table        -g, --groups             display multicast group memberships        -s, --statistics         display networking statistics (like SNMP)        -M, --masquerade         display masqueraded connections        -v, --verbose            be verbose        -W, --wide               don't truncate IP addresses        -n, --numeric            don't resolve names        --numeric-hosts          don't resolve host names        --numeric-ports          don't resolve port names        --numeric-users          don't resolve user names        -N, --symbolic           resolve hardware names        -e, --extend             display other/more information        -p, --programs           display PID/Program name for sockets        -o, --timers             display timers        -c, --continuous         continuous listing        -l, --listening          display listening server sockets        -a, --all                display all sockets (default: connected)        -F, --fib                display Forwarding Information Base (default)        -C, --cache              display routing cache instead of FIB        -Z, --context            display SELinux security context for sockets  <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-S|--sctp} {-w|--raw}           {-x|--unix} --ax25 --ipx --netrom  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: inet  List of possible address families (which support routing):    inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)     netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)     x25 (CCITT X.25)

用户操作

12345
net user chessur password /addnet localgroup administrators chessur /addnet user chessur /active:yesnet user chessur /actice:nonet user chessur /del
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!