当前位置:网站首页>内网渗透之DOS命令
内网渗透之DOS命令
2022-04-23 20:23:00 【花城的包包】
前言
目录
🥦一、渗透常用的DOS命令
1.cd切换当前目录
cd path :path是路径,即可切换到对应路径。例如,你想进入Program Files目录:
cd . . :后面的两个点表示返回到上一级目录
cd /:表示无论在哪个目录下,通过该命令可立即返回到根目录下
2.dir(列出磁盘目录文件)
使用dir命令可以列出磁盘上所有的或指定的文件目录,显示的内容包含卷标、文件名、文件大小、文件建立日期和时间、目录名、磁盘剩余空间 等。语法格式如下:
dir [盘符] [路径] [文件名] [/P] [/W] [/A:属性]
各个参数的作用:
- /P:当显示的信息超过一屏时暂停显示,直至按任意键继续显示。
- /W:以横向排列的形式显示文件名和目录名,每行5个,但不显示文件的大小和建立日期。
- /A:属性:仅显示指定属性的文件,无此参数时,显示除系统和隐含文件外的所有文件,可指定为以下几种:
- /AS:显示系统文件的信息;
- / AH:显示隐含文件的信息;
- / AR:显示只读文件的信息;
- / AA:显示归档文件的信息;
- / AD:显示目录信息。
具体步骤:
查看当前目录下的文件信息:
查看c盘下的所有文件的目录:
查看隐藏文件:
注意:windows不缺分大小写!
3.ping(检查计算机连接状态)
ping命令是 TCP/IP中最为常用的命令之一,主要用来检查网络是否通常或者网络连接的速度。
具体步骤如下:
ping命令判断计算机的操作系统类型:可通过返回包中TTL 的值判断。TTL(Time To Live)当我们在使用ping命令时,返回结果里会带一个TTL值。这个东西的含义其实就是Time To Live,指的是报文在网络中能够’存活’的限制。当报文在网络中转发时,时间超过这个限制,最后一个收到报文的路由点’就会把它扔掉,而不继续转发。后来把时间限制改为了跳数限制,就是当报文在网络中转发时,每经过一个‘‘路由点’,就把预先设定的这个TTL数值减1,直到最后TTL=1时报文就被扔掉,不向下转发。
因此TTL字段值可以帮助我们识别操作系统类型:
LINUX 64
Windows 2000/NT/XP/7/10: 64~128(但存在特殊情况,像TTL=64有时候就是Linux,要结合其它判定方法得出结论,这个我们下次再说)
WINDOwS系列:32
UNIX系列:128~255
在命令提示符窗口中输入ping 192.168.202.133 -t -l 128命令,可以不断像主机发送大量数据包:
判断本台计算机是否与外界连通:ping www.baidu.com
解析某ip地址的计算机名 ping -a 192.168.202.133
4.net(查询网络状态与共享资源)
查询本台计算机开启哪些windows服务:net start
5.netstat(显示网络连接信息)
netstat命令主要用来显示网络连接的信息,包括显示活动的TCP连接、路由器和网络接口信息,是一个监控TCP/IP网络非常有用的工具,可以让用户得知系统中目前都有哪些网络连接正常。
netstat /?:获取帮助信息
netstat -a:显示所有连接和监听端口:
netstat -r :显示路由信息:
剩下的你们用到了再去查,我就不一一演示了。
6.tracert(检查网络路由节点)
使用 tracert 命令可以查看网络中路由节点信息,最常见的使用方法是在tracert命令后追加一个参数,表示检测和查看连接当前主机经历了哪些路由节点,适用于大型网络的测试。该命令的语法格式如下:
tracert [-d][-h MaximumHops] [-j Hostlist] [-w Timeout] [TargetName]
其中,各个参数的含义如下:
(1)-d:防止解析目标主机的名字,可以加速显示tracert命令结果。
(2) -h MaximumHops:指定搜索到目标地址的最大跳跃数,默认为30个跳跃点。
(3) -j Hostlist: 按照主机列表中的地址释放源路由。
(4) -W Timeout:指定超时时间间隔,默认单位为毫秒。
(5) TargetName:指定目标计算机。
查看www.baidu.com的路由与局城网络连接情况:
7.tasklist(显示主机进程信息)
Taklist命令用来显示运行在本地或远程计算机上的所有进程,带有多个执行参数。Tasklist命令的格式如下:
Tasklist [/s system [ /u username[/p[password]]]][/m [module] | /SVC / V ][/fi filter][/fo format] [/nh]
利用Tasklist命令可以查看本机中的进程及每个进程提供的服务:
查看本机svchost.exe提供的服务:
查看本地系统中哪些进程调用了shell32.dll模块文件:
8.sfc(扫描并修复系统错误)
sfc命令主要作用是扫描所有受保护的系统文件并完成修复工作。该命令的语法格式如下:
sfc"/scannow""Iscanonce""/scanboot""/revert""/purgecache""/cachesize=x"
其中,各个参数的含义如下。
(1) /scannow: 立即扫描所有受保护的系统文件。
(2) /scanonce:下次启动时,扫描所有受保护的系统文件。
(3) /scanboot:每次启动时,扫描所有受保护的系统文件。
(4) /revert:将扫描返回到默认设置。
(5) /purgecache:清除文件缓存。
(6) /cachesize- X:设置文件缓存大小。
下面以最常用的sfc/scannow为例进行讲解,具体操作步骤如下:
右击“开始”按钮,在弹出的快捷菜单中选择“命令提示符(管理员)”选项,如下图所示。
选择是,回车:
输入:sfc/scannow 回车:开始自动扫描系统,需要一点时间。如果发现有损坏的系统文件会自动进行修复,并显示修复后的信息,如下图:
🥦二、实战练习
1.使用命令执行(清除系统垃圾文件)
用批处理文件的方式快速清除计算机中的垃圾文件,步骤如下:
打开记事本,在其中输入代码:重命名为 delete.bat
@echo off
echo正在清除系统垃圾文件,请稍候......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q"Suserprofile号\LocalSettings\Temporary Internet Files\*.*"
del/f /s /q“userprofile&\LocalSettings.\Temp\* .*”
del / f /s /q "%userprofile%\recent\*.*
echo垃圾清理完成!
echo. & pause
在dos窗口中运行:
2.使用shutdown命令(实现定时关机)
命令提示符窗口中输入:shutdown /s /t 30
取消关机操作:shutdown /a
3.通过滑动鼠标关闭计算机
按Win+R键,在输入框中输入:C:\Windows\System32\SlideToShutdown.exe
鼠标向下滑动则可关闭计算机,向上取消。
🥦三、结语
为你,灯明三千,为你,花开满城,为你,所向披靡!
———— 花城的包包
版权声明
本文为[花城的包包]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_45697116/article/details/124299454
边栏推荐
- Numpy - creation of data type and array
- 2022 - Data Warehouse - [time dimension table] - year, week and holiday
- WordPress plug-in: WP CHINA Yes solution to slow domestic access to the official website
- Plato Farm元宇宙IEO上线四大,链上交易颇高
- [latex] 5 how to quickly write out the latex formula corresponding to the formula
- PCA based geometric feature calculation of PCL point cloud processing (52)
- Shanghai responded that "flour official website is an illegal website": neglect of operation and maintenance has been "hacked", and the police have filed a case
- 三十.什么是vm和vc?
- 16MySQL之DCL 中 COMMIT和ROllBACK
- ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
猜你喜欢
WordPress plug-in: WP CHINA Yes solution to slow domestic access to the official website
Five minutes to show you what JWT is
Commit and ROLLBACK in DCL of 16mysql
Some basic knowledge of devexpress report development
【PTA】L1-002 打印沙漏
Matlab analytic hierarchy process to quickly calculate the weight
Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
Rt-1052 learning notes - GPIO architecture analysis
16MySQL之DCL 中 COMMIT和ROllBACK
[stack and queue topics] - sliding window
随机推荐
【PTA】整除光棍
Remote code execution in Win 11 using wpad / PAC and JScript
[problem solving] 'ASCII' codec can't encode characters in position XX XX: ordinal not in range (128)
Browser - learning notes
Es keyword sorting error reason = fielddata is disabled on text fields by default Set fielddata = true on keyword in order
Markdown < a > tag new page open link
selenium. common. exceptions. WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
Plato Farm元宇宙IEO上线四大,链上交易颇高
PIP installation package reports an error. Could not find a version that satisfies the requirement pymysql (from versions: none)
JDBC tool class jdbcfiledateutil uploads files and date format conversion, including the latest, simplest and easiest way to upload single files and multiple files
Installation and use of NVM
Error reported by Azkaban: Azkaban jobExecutor. utils. process. ProcessFailureException: Process exited with code 127
Commit and ROLLBACK in DCL of 16mysql
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
Thirty What are VM and VC?
2022DASCTF Apr X FATE 防疫挑战赛 CRYPTO easy_real
Research on open source OCR engine
Fundamentals of network communication (LAN, Wan, IP address, port number, protocol, encapsulation and distribution)
. Ren -- the intimate artifact in the field of vertical Recruitment!
Numpy Index & slice & iteration