 『楼 主』:
[分享]DOS命令八大经典案例
使用 LLM 解释/回答一下
DOS命令八大经典案例
2007-08-13 11:45:46
DOS已逐渐远去,我们每天都习惯地使用着Windows 98/Me/2000/XP,可是你了解Windows中的DOS吗?其实在有些时候DOS还是比Windows要方便快捷得多,毕竟这个是操作系统的经典之作。下面就笔者在使用DOS过程中摸索的技巧总结成八大案例来说明一下,希望多多少少能对读者在使用电脑的过程中有点启发和帮助。
案例一、“FC”―文件对比
众所周知,在安装软件时,一般会在注册表中或多或少留下点什么,时间一长就会有大量的垃圾留在里面,让我们的系统逐渐变慢直至崩溃。诚然现在有很多好用的工具可以帮我们解决这个难题,可是如果我们想知道它们究竟在注册表中留下了什么,而手头又没有合适的工具,难道就束手无策了吗?t等等,我们请出DOS下最方便的比较工具――“FC”
格式:FC <filename><filename></b>
使用方法:首先在安装软件前把注册表导出为一个文件如:“1.reg”,在安装软件后再导出为一个文件如:“2.reg”。这两个文件假设都放在C盘根目录下。我们进入MS-DOS方式输入“C:\fc 1.reg 2.reg”回车。看到了没有?屏幕上显示的正是注册表被改动的地方。
注:FC默认逐行比较两个文件。文件中每一行的长度应小于256个字符,如果行长超过256个字符或者比较对象是二进制文件或程序文件,应在后面加上/b参数,FC将对它们逐字节比较。
案例二、“>”―定向输出
我们接着上面的案例。有的时候我们在用上面的方法时发现屏幕不停地往上滚动,好多信息一闪而过停都停不下来,这种情况是由于两个文件相差太大的缘故,文件被改动的地方太多了。怎么办呢?t别着急,这时候我们要用到另外一个小技巧――使用定向输出“>”
格式:命令(或程序)>定向输入设备(或文件名)
使用方法:我们还用上面的例子,在DOS下输入C:\fc 1.reg 2.reg >change.txt回车。
怎么什么信息都没了啊。其实你仔细看一下就会发现在该目录下多了一个FC.txt文件,快用写字板打开它啊,里面可是放着这两个文件的全部比较信息呀:)so easy 吧。
注:你可以把它输出为任何格式的文件,它们都可以以文本方式打开。
案例三、“copy”―文件合并
有很多时候网上把视频文件分割成好多小段让大家分别下载,可是下载好的文件在看的时候又老是不停地要打开,那么有没有什么办法让它们重新合并成一个整的文件呢?用专门的视频编辑工具固然可以,可是那繁琐的E文让我辈头痛。其实DOS下就有现成的工具,用我们常用的“copy”命令就可以完成,让我们来看看吧。
格式:copy /b <filename1>+<filename2>+…+<filenameN>>filename>
使用方法:假设你的硬盘有两个文件分别是video1.mpg 和 video2.mpg 那么我们在该目录下输入“copy /b video1.mpg+video2.mpg video.mpg”就可以了,其中video.mpg是你合并后生成的新文件名。赶紧试一试,打开播放器看看是不是拼合好了。
当然,你喜欢的小说、音乐,如果嫌不停地打开关闭太麻烦,不妨试试这个方法把它们合并在一起观看。
案例四、“copy”―批量重命名 其实偶是来赚积分的,嘿嘿
一个朋友要做项目需要把一系列文本文件按编号重新命名,可是由于数量实在太多,在Windows中一点点地改太麻烦了,头都大了:(有没有简单一点的方法呢?t)好多杂志上介绍了好多工具和方法来实现这个,可是我觉得都比较麻烦。其实我们把DOS命令和回收站结合使用就可以完成批量改名。
使用方法:假设E盘上有大量要改名的文件,那么首先把它们弄到回收站里!(切记!仅仅只是删除,不要清空回收站啊,文件丢了我可不负责!),然后我们进入MS-DOS模式下的E盘,在根目录下输入“cd recycled”进入回收站,dir看看,是不是所有的文件名都改变成有顺序的了:)接下来我们把它们都给拷贝出来。输入“copy *.* e:\”哈哈,返回Windows去看看吧是不是所有的文件都为DE1、DE2……了。
注:1.删除之前要先清空“回收站”,否则文件将有可能从未知数字基数开始。
2.在哪个盘删除的就进入哪个盘的recycled文件夹,别的盘里没有对应文件的。
3.文件名被修改后命名格式为DX1,D是固定的表示DISK,X是对应你的盘符,如果是在F盘就是DF1,如果是D盘就是DD1,依此类推。
案例五、“copy”―改文件日期
某同事因为工作需要要修改文件的日期,在Windows中忙乎了半天也不知道该怎么改:(难道我们真的只能求助于专用工具了吗?其实不然,同样是使用copy命令就可以轻松完成:)
格式:copy <filename>+??
使用方法:假设我们要修改的文件是redate.dat文件,它在C盘,那么我们首先进入MS-DOS方式,在C盘下输入“copy 123.dat+,,”(注:加号后面紧跟2个逗号)回车后系统会询问你是否覆盖?这时键入“Y”即更改为当前日期,是不是非常简单啊?
案例六、FDISK―修复引导区
同事今天开机突然发现系统无法启动,屏幕提示“No System,System Halted”其实根据提示我们可以知道,问题肯定出在硬盘的引导区上。这种情况一般是引导记录损坏或被病毒感染,或是分区表中无自举标志,还有可能是结束标志55AAH被改写而造成的。
格式:fdisk /MBR
使用办法:用DOS引导盘启动电脑,在提示符下执行“FDISK /MBR”命令。FDISK中本身就包含有主引导程序代码和结束标志55AAH,这一招对于修复主引导记录和结束标志55AAH既快又灵,而且不用担心会损坏任何硬盘上的文件!
案例七、“ping”―查看是否连线
在网吧上网时服务器突然断线,网管在解决故障,看他忙得满头大汗我们都不好意思问“什么时候可以通”。可是总不能打开个网页不停按刷新吧,这个时候用一个简单的DOS命令就可以在最短的时间内检测出什么时候能连上线了,而且还不用那么费事:)
格式:ping <count name> -t
使用方法:在MS-DOS模式下执行“ping http://www.xxx.com/ -t”就可以啦:)你可以看到屏幕不停地上滚,如果是通的话就会显示“Reply from xxx.xxx.xxx.xxx: bytes=32 ……”的信息,否则就显示“Destination host unreachable”。这样你就可以一边干别的一边在第一时间知道什么时候网络是通的啦。
案例八、“debug”―破解COMS
朋友的品牌机CMOS被他无意中锁住了,怎么办呢?t这时候你也许会说打开机箱给电池放电不就行了吗。可是品牌机如果拆了机箱多半保修的问题就泡汤了。其实DOS下有个非常好用的工具来解开这个密码――DEBUG。由于这个是个工具,它实在太博大精深了,所以没法给出格式。不过可以跟着我一步步地做,咱们不学太多,只就事论事不就成了。
启动系统后进入DOS模式,如果是Windows Me(XP)则用启动盘启动,在DOS下输入以下指令:
debug
-o70 21
-o71 20
-q
好了,咱们重新启动电脑看看是不是已经解开了:??
关于案例分析咱们就先说到这里了,虽然DOS已经落伍淘汰离我们远去了,可是当你的系统出现蓝屏时、当你的系统崩溃时、当你对一些问题的解决觉得烦琐时,也许DOS能给你最好的答案。
说明:以上各方法均可在微软任何操作系统环境下使用,所有外部程序在Windows 98的启动盘中均可以找到。
最近更新时间:2007-08-13 11:45:46
下一篇: 掌握8个DOS命令
上一篇: 2007年8月10日
发表评价
(0)(0)
登录雅虎空间,给你喜欢的网志发表评论。雅虎社区仅提供信息存储空间服务,其内容均由服务对象提供。根据《信息网络传播权保护条例》,部分内容可能应权利人通知未予显示,请点击这里查看。
关于雅虎 | 帮助中心 | 联系我们 | 诚聘英才 | 广告服务 | 搜索竞价 | 雅虎百业窗 | 网站联盟 | 雅虎大全
Copyright ? 2008 Yahoo.com.cn 版权所有 不得转载 使用须知 著作权声明
一,ping
它是用来检查网络是否通畅或者网络连接速度的命令。作为一个生活在网络上的管理员或者黑客来说,ping命令是第一个必须掌握的DOS命令,它所利用的原理是这样的:网络上的机器都有唯一确定的IP地址,我们给目标IP地址发送一个数据包,对方就要返回一个同样大小的数据包,根据返回的数据包我们可以确定目标主机的存在,可以初步判断目标主机的操作系统等。下面就来看看它的一些常用的操作。先看看帮助吧,在DOS窗口中键入:ping /? 回车,。所示的帮助画面。在此,我们只掌握一些基本的很有用的参数就可以了(下同)。
-t 表示将不间断向目标IP发送数据包,直到我们强迫其停止。试想,如果你使用100M的宽带接入,而目标IP是56K的小猫,那么要不了多久,目标IP就因为承受不了这么多的数据而掉线,呵呵,一次攻击就这么简单的实现了。
-l 定义发送数据包的大小,默认为32字节,我们利用它可以最大定义到65500字节。结合上面介绍的-t参数一起使用,会有更好的效果哦。
-n 定义向目标IP发送数据包的次数,默认为3次。如果网络速度比较慢,3次对我们来说也浪费了不少时间,因为现在我们的目的仅仅是判断目标IP是否存在,那么就定义为一次吧。
说明一下,如果-t 参数和 -n参数一起使用,ping命令就以放在后面的参数为标准,比如“ping IP -t -n 3”,虽然使用了-t参数,但并不是一直ping下去,而是只ping 3次。另外,ping命令不一定非得ping IP,也可以直接ping主机域名,这样就可以得到主机的IP。
下面我们举个例子来说明一下具体用法。
这里time=2表示从发出数据包到接受到返回数据包所用的时间是2秒,从这里可以判断网络连接速度的大小 。从TTL的返回值可以初步判断被ping主机的操作系统,之所以说“初步判断”是因为这个值是可以修改的。这里TTL=32表示操作系统可能是win98。
(小知识:如果TTL=128,则表示目标主机可能是Win2000;如果TTL=250,则目标主机可能是Unix)
至于利用ping命令可以快速查找局域网故障,可以快速搜索最快的QQ服务器,可以对别人进行ping攻击……这些就靠大家自己发挥了。
二,nbtstat
该命令使用TCP/IP上的NetBIOS显示协议统计和当前TCP/IP连接,使用这个命令你可以得到远程主机的NETBIOS信息,比如用户名、所属的工作组、网卡的MAC地址等。在此我们就有必要了解几个基本的参数。
-a 使用这个参数,只要你知道了远程主机的机器名称,就可以得到它的NETBIOS信息(下同)。
-A 这个参数也可以得到远程主机的NETBIOS信息,但需要你知道它的IP。
-n 列出本地机器的NETBIOS信息。
当得到了对方的IP或者机器名的时候,就可以使用nbtstat命令来进一步得到对方的信息了,这又增加了我们入侵的保险系数。
三,netstat
这是一个用来查看网络状态的命令,操作简便功能强大。
-a 查看本地机器的所有开放端口,可以有效发现和预防木马,可以知道机器所开的服务等信息,如图4。
这里可以看出本地机器开放有FTP服务、Telnet服务、邮件服务、WEB服务等。用法:netstat -a IP。
-r 列出当前的路由信息,告诉我们本地机器的网关、子网掩码等信息。用法:netstat -r IP。
四,tracert
跟踪路由信息,使用此命令可以查出数据从本地机器传输到目标主机所经过的所有途径,这对我们了解网络布局和结构很有帮助。如图5。
这里说明数据从本地机器传输到192.168.0.1的机器上,中间没有经过任何中转,说明这两台机器是在同一段局域网内。用法:tracert IP。
五,net
这个命令是网络命令中最重要的一个,必须透彻掌握它的每一个子命令的用法,因为它的功能实在是太强大了,这简直就是微软为我们提供的最好的入侵工具。首先让我们来看一看它都有那些子命令,键入net /?回车如图6。
在这里,我们重点掌握几个入侵常用的子命令。
net view
使用此命令查看远程主机的所以共享资源。命令格式为net view \\IP。
net use
把远程主机的某个共享资源影射为本地盘符,图形界面方便使用,呵呵。命令格式为net use x: \\IP\sharename。上面一个表示把192.168.0.5IP的共享名为magic的目录影射为本地的Z盘。下面表示和192.168.0.7建立IPC$连接(net use $">\\IP\IPC$ "password" /user:"name"),
建立了IPC$连接后,呵呵,就可以上传文件了:copy nc.exe $">\\192.168.0.7\admin$,表示把本地目录下的nc.exe传到远程主机,结合后面要介绍到的其他DOS命令就可以实现入侵了。
net start
使用它来启动远程主机上的服务。当你和远程主机建立连接后,如果发现它的什么服务没有启动,而你又想利用此服务怎么办?就使用这个命令来启动吧。用法:net start servername,如图9,成功启动了telnet服务。
net stop
入侵后发现远程主机的某个服务碍手碍脚,怎么办?利用这个命令停掉就ok了,用法和net start同。
net user
查看和帐户有关的情况,包括新建帐户、删除帐户、查看特定帐户、激活帐户、帐户禁用等。这对我们入侵是很有利的,最重要的,它为我们克隆帐户提供了前提。键入不带参数的net user,可以查看所有用户,包括已经禁用的。下面分别讲解。
1,net user abcd 1234 /add,新建一个用户名为abcd,密码为1234的帐户,默认为user组成员。
2,net user abcd /del,将用户名为abcd的用户删除。
3,net user abcd /active:no,将用户名为abcd的用户禁用。
4,net user abcd /active:yes,激活用户名为abcd的用户。
5,net user abcd,查看用户名为abcd的用户的情况
net localgroup
查看所有和用户组有关的信息和进行相关操作。键入不带参数的net localgroup即列出当前所有的用户组。在入侵过程中,我们一般利用它来把某个帐户提升为administrator组帐户,这样我们利用这个帐户就可以控制整个远程主机了。用法:net localgroup groupname username /add。
现在我们把刚才新建的用户abcd加到administrator组里去了,这时候abcd用户已经是超级管理员了,呵呵,你可以再使用net user abcd来查看他的状态,和图10进行比较就可以看出来。但这样太明显了,网管一看用户情况就能漏出破绽,所以这种方法只能对付菜鸟网管,但我们还得知道。现在的手段都是利用其他工具和手段克隆一个让网管看不出来的超级管理员,这是后话。有兴趣的朋友可以参照《黑客防线》第30期上的《由浅入深解析隆帐户》一文。
net time
这个命令可以查看远程主机当前的时间。如果你的目标只是进入到远程主机里面,那么也许就用不到这个命令了。但简单的入侵成功了,难道只是看看吗?我们需要进一步渗透。这就连远程主机当前的时间都需要知道,因为利用时间和其他手段(后面会讲到)可以实现某个命令和程序的定时启动,为我们进一步入侵打好基础。用法:net time \\IP。
六,at
这个命令的作用是安排在特定日期或时间执行某个特定的命令和程序(知道net time的重要了吧?)。当我们知道了远程主机的当前时间,就可以利用此命令让其在以后的某个时间(比如2分钟后)执行某个程序和命令。用法:at time command \\computer。
表示在6点55分时,让名称为a-01的计算机开启telnet服务(这里net start telnet即为开启telnet服务的命令)。
七,ftp
大家对这个命令应该比较熟悉了吧?网络上开放的ftp的主机很多,其中很大一部分是匿名的,也就是说任何人都可以登陆上去。现在如果你扫到了一台开放ftp服务的主机(一般都是开了21端口的机器),如果你还不会使用ftp的命令怎么办?下面就给出基本的ftp命令使用方法。
首先在命令行键入ftp回车,出现ftp的提示符,这时候可以键入“help”来查看帮助(任何DOS命令都可以使用此方法查看其帮助)。
大家可能看到了,这么多命令该怎么用?其实也用不到那么多,掌握几个基本的就够了。
首先是登陆过程,这就要用到open了,直接在ftp的提示符下输入“open 主机IP ftp端口”回车即可,一般端口默认都是21,可以不写。接着就是输入合法的用户名和密码进行登陆了,这里以匿名ftp为例介绍。
用户名和密码都是ftp,密码是不显示的。当提示**** logged in时,就说明登陆成功。这里因为是匿名登陆,所以用户显示为Anonymous。
接下来就要介绍具体命令的使用方法了。
dir 跟DOS命令一样,用于查看服务器的文件,直接敲上dir回车,就可以看到此ftp服务器上的文件。
cd 进入某个文件夹。
get 下载文件到本地机器。
put 上传文件到远程服务器。这就要看远程ftp服务器是否给了你可写的权限了,如果可以,呵呵,该怎么 利用就不多说了,大家就自由发挥去吧。
delete 删除远程ftp服务器上的文件。这也必须保证你有可写的权限。
bye 退出当前连接。
quit 同上。
八,telnet
功能强大的远程登陆命令,几乎所有的入侵者都喜欢用它,屡试不爽。为什么?它操作简单,如同使用自己的机器一样,只要你熟悉DOS命令,在成功以administrator身份连接了远程机器后,就可以用它来**想干的一切了。下面介绍一下使用方法,首先键入telnet回车,再键入help查看其帮助信息。
然后在提示符下键入open IP回车,这时就出现了登陆窗口,让你输入合法的用户名和密码,这里输入任何密码都是不显示的。
当输入用户名和密码都正确后就成功建立了telnet连接,这时候你就在远程主机上具有了和此用户一样的权限,利用DOS命令就可以实现你想干的事情了。这里我使用的超级管理员权限登陆的。
到这里为止,网络DOS命令的介绍就告一段落了,这里介绍的目的只是给菜鸟网管一个印象,让其知道熟悉和掌握网络DOS命令的重要性。其实和网络有关的DOS命令还远不止这些,这里只是抛砖引玉,希望能对广大菜鸟网管有所帮助。学好DOS对当好网管有很大的帮助,特别的熟练掌握了一些网络的DOS命令。
另外大家应该清楚,任何人要想进入系统,必须得有一个合法的用户名和密码(输入法漏洞差不多绝迹了吧),哪怕你拿到帐户的只有一个很小的权限,你也可以利用它来达到最后的目的。所以坚决消灭空口令,给自己的帐户加上一个强壮的密码,是最好的防御弱口令入侵的方法。
麦肚最后由衷的说一句,培养良好的安全意识才是最重要的。
Classic Cases of DOS Commands
2007-08-13 11:45:46
DOS is gradually fading away. We habitually use Windows 98/Me/2000/XP every day. But do you understand DOS in Windows? Actually, in some cases, DOS is much more convenient and faster than Windows. After all, this is a classic work of the operating system. The following are eight classic cases summarized from the skills I explored in using DOS, hoping to inspire and help readers a little in using computers.
Case 1: "FC" - File Comparison
As we all know, when installing software, some traces are generally left in the registry more or less. Over time, there will be a large amount of garbage left, making our system gradually slow down until it crashes. Indeed, there are many useful tools to help us solve this problem. But if we want to know what exactly they leave in the registry and there is no suitable tool at hand, are we helpless? Wait, let's bring out the most convenient comparison tool under DOS - "FC"
Format: FC [path]<filename>[path]<filename></b>
Usage: First, export the registry as a file such as "1.reg" before installing the software, and export another file such as "2.reg" after installing the software. Suppose both files are placed in the root directory of drive C. We enter the MS-DOS mode and type "C:\fc 1.reg 2.reg" and press Enter. Did you see it? The screen shows exactly the places where the registry has been modified.
Note: FC defaults to comparing two files line by line. The length of each line in the file should be less than 256 characters. If the line length exceeds 256 characters or the comparison object is a binary file or program file, add the /b parameter at the end. FC will compare them byte by byte.
Case 2: ">" - Redirected Output
Let's continue with the above case. Sometimes when we use the above method, we find that the screen keeps scrolling up, and many messages flash by and can't be stopped. This is because the two files are too different and there are too many modified places. What to do? Don't worry. At this time, we need to use another small skill - use the redirected output ">".
Format: Command (or program) > Redirected input device (or filename)
Usage: We still use the above example. Type "C:\fc 1.reg 2.reg >change.txt" in DOS and press Enter.
Why is there no information? Actually, if you look carefully, you will find that a FC.txt file is added in this directory. Quickly open it with Notepad. It contains all the comparison information of these two files: ) So easy, right.
Note: You can output it to any format file, and they can all be opened in text mode.
Case 3: "copy" - File Merging
There are many times when video files on the Internet are divided into many small segments for everyone to download separately. But when watching the downloaded files, you always have to open them continuously. So is there any way to merge them back into a whole file? Although using a special video editing tool is possible, the cumbersome English makes us headache. Actually, there is a ready-made tool under DOS. The commonly used "copy" command can be used to complete it. Let's take a look.
Format: copy /b <filename1>+<filename2>+…+<filenameN>>filename>
Usage: Suppose you have two files on your hard disk, namely video1.mpg and video2.mpg. Then type "copy /b video1.mpg+video2.mpg video.mpg" in this directory. The video.mpg is the new filename generated after merging. Hurry up and try it. Open the player to see if it is merged well.
Of course, if you like novels and music and find it too troublesome to open and close continuously, you might as well try this method to merge them together for viewing.
Case 4: "copy" - Batch Renaming [color=White] Actually, I'm here to earn points, he he[/color]
A friend needs to rename a series of text files according to numbers for a project. But because the number is too large, it's too troublesome to change them one by one in Windows. Is there a simpler method? ) Many magazines introduce many tools and methods to achieve this, but I think they are all more troublesome. Actually, we can complete batch renaming by combining DOS commands and the Recycle Bin.
Usage: Suppose there are a large number of files to be renamed on drive E. Then first move them to the Recycle Bin! (Remember! Just delete them, don't empty the Recycle Bin! I won't be responsible if the files are lost!) Then we enter the MS-DOS mode of drive E, type "cd recycled" in the root directory to enter the Recycle Bin, and type dir to see if all the filenames have been changed to be in order: ) Next, we copy them all out. Type "copy *.* e:\". Go back to Windows and see if all the files are DE1, DE2...
Note: 1. Empty the "Recycle Bin" before deleting, otherwise the file may start from an unknown number base.
2. Enter the recycled folder of the corresponding drive if you delete files on that drive. There are no corresponding files in other drives.
3. The filename after modification is named as DX1. D is fixed to represent DISK. X corresponds to your drive letter. If it is on drive F, it is DF1. If it is on drive D, it is DD1, and so on.
Case 5: "copy" - Change File Date
A colleague needs to change the date of a file for work, but has been busy in Windows for a long time and doesn't know how to do it: ( Do we really have to rely on special tools? Actually, no. The same "copy" command can be used to easily complete it: )
Format: copy <filename>+??
Usage: Suppose the file we want to modify is redate.dat, and it is on drive C. Then we first enter the MS-DOS mode, type "copy 123.dat+,, " (Note: two commas follow the plus sign) in drive C and press Enter. Then the system will ask if you want to overwrite? Type "Y" here to change it to the current date. Isn't it very simple?
Case 6: FDISK - Repair Boot Sector
My colleague found that the system couldn't start when turning on the computer today. The screen prompted "No System, System Halted". Actually, according to the prompt, we can know that the problem must be in the boot sector of the hard disk. This situation is generally caused by the corruption or virus infection of the boot record, or the absence of the boot flag in the partition table, or the end flag 55AAH being rewritten.
Format: fdisk /MBR
Usage: Boot the computer with a DOS boot disk, and execute the "FDISK /MBR" command at the prompt. FDISK itself contains the main boot program code and the end flag 55AAH. This trick is both fast and effective for repairing the main boot record and the end flag 55AAH, and there's no need to worry about damaging any files on the hard disk!
Case 7: "ping" - Check if Connected
When surfing the Internet in an Internet cafe, the server suddenly breaks off. The network administrator is busy solving the fault. We feel embarrassed to ask "When will it be connected". But we can't keep refreshing a web page. At this time, a simple DOS command can detect when the network is connected in the shortest time, and it's not so troublesome: )
Format: ping <count name> -t
Usage: Execute "ping [url]http://www.xxx.com/[/url] -t" in the MS-DOS mode: ) You can see the screen keeps scrolling up. If it's connected, it will display the information like "Reply from xxx.xxx.xxx.xxx: bytes=32 ……". Otherwise, it will display "Destination host unreachable". Then you can do other things while knowing in the first time when the network is connected.
Case 8: "debug" - Crack COMS
My friend's brand computer CMOS was accidentally locked. What to do? ) At this time, you might say that opening the case to discharge the battery will do. But if you disassemble the case of a brand computer, most of the warranty issues will be out of the question. Actually, there is a very useful tool under DOS to unlock this password - DEBUG. Because this is a tool, it's too profound, so the format can't be given. But you can follow me step by step. We don't learn too much, just deal with the matter.
Boot the system and enter the DOS mode. If it's Windows Me (XP), use the boot disk to boot. Type the following commands under DOS:
debug
-o70 21
-o71 20
-q
Okay, let's restart the computer and see if it's unlocked:??
Let's stop here for the case analysis. Although DOS has become outdated and far away from us, when your system has a blue screen, when your system crashes, and when you find it cumbersome to solve some problems, maybe DOS can give you the best answer.
Note: The above methods can all be used in any Microsoft operating system environment, and all external programs can be found in the startup disk of Windows 98.
Latest update time: 2007-08-13 11:45:46
Next: Master 8 DOS Commands
Previous: August 10, 2007
Post an evaluation
(0)(0)
Log in to Yahoo Space to post comments on the blog you like. Yahoo Community only provides information storage space services, and all its contents are provided by the service objects. According to the "Regulations on the Protection of Information Network Transmission Rights", part of the contents may not be displayed as required by the right holder. Please click here to view.
About Yahoo | Help Center | Contact Us | Career Opportunities | Advertising Services | Search Bidding | Yahoo Business Window | Website Alliance | Yahoo Directory
Copyright ? 2008 Yahoo.com.cn All rights reserved. No reproduction allowed. Usage Terms. Copyright Declaration
First, ping
It is a command used to check whether the network is unobstructed or the network connection speed. As an administrator or hacker living on the network, the ping command is the first DOS command that must be mastered. The principle it uses is like this: All machines on the network have a unique IP address. We send a data packet to the target IP address, and the other party should return a data packet of the same size. According to the returned data packet, we can determine the existence of the target host and can initially judge the operating system of the target host and so on. Now let's take a look at some of its commonly used operations. First, take a look at the help. Type "ping /?" in the DOS window and press Enter, and the help screen shown is displayed. Here, we only need to master some basic and very useful parameters (the same below).
-t means that it will continuously send data packets to the target IP until we force it to stop. Imagine, if you use a 100M broadband access and the target IP is a 56K modem, then it won't take long for the target IP to be disconnected because it can't bear so much data. Hehe, an attack is simply realized like this.
-l defines the size of the sent data packet. The default is 32 bytes. We can use it to define up to 65500 bytes at most. Use it together with the -t parameter introduced above, and it will have a better effect.
-n defines the number of times to send data packets to the target IP. The default is 3 times. If the network speed is relatively slow, 3 times also wastes a lot of our time. Because now our purpose is only to judge whether the target IP exists, then define it as once.
It should be noted that if the -t parameter and the -n parameter are used together, the ping command will be based on the parameter placed later. For example, "ping IP -t -n 3", although the -t parameter is used, it doesn't keep pinging all the time, but only pings 3 times. In addition, the ping command doesn't have to ping the IP necessarily. It can also directly ping the host domain name, so that the IP of the host can be obtained.
Now let's take an example to illustrate the specific usage.
Here, time=2 means that the time from sending the data packet to receiving the returned data packet is 2 seconds. From this, we can judge the size of the network connection speed. From the return value of TTL, we can initially judge the operating system of the pinged host. The reason why it's said "initially judge" is that this value can be modified. Here, TTL=32 means that the operating system may be win98.
(Little knowledge: If TTL=128, it means that the target host may be Win2000; if TTL=250, it means that the target host may be Unix)
As for using the ping command to quickly find LAN faults, quickly search for the fastest QQ server, and ping attack others... It's up to you to play.
Second, nbtstat
This command uses NetBIOS over TCP/IP to display protocol statistics and current TCP/IP connections. With this command, you can get the NETBIOS information of the remote host, such as the user name, the workgroup it belongs to, the MAC address of the network card, etc. Here, we need to understand several basic parameters.
-a Use this parameter. As long as you know the machine name of the remote host, you can get its NETBIOS information (the same below).
-A This parameter can also get the NETBIOS information of the remote host, but you need to know its IP.
-n List the NETBIOS information of the local machine.
When you get the IP or machine name of the other party, you can use the nbtstat command to further get the information of the other party, which increases the insurance coefficient of our intrusion.
Third, netstat
This is a command used to view the network status. It is easy to operate and powerful.
-a View all open ports of the local machine. It can effectively discover and prevent trojans and can know the services opened by the machine, as shown in Figure 4.
Here, it can be seen that the local machine has open FTP services, Telnet services, mail services, WEB services, etc. Usage: netstat -a IP.
-r List the current routing information and tell us the gateway, subnet mask, etc. of the local machine. Usage: netstat -r IP.
Fourth, tracert
Trace the routing information. Using this command, you can find out all the paths that data travels from the local machine to the target host. This is very helpful for us to understand the network layout and structure. As shown in Figure 5.
Here, it shows that data travels from the local machine to the machine with IP 192.168.0.1, and no intermediate transfers are made. It shows that these two machines are in the same LAN segment. Usage: tracert IP.
Fifth, net
This command is the most important one in network commands. We must thoroughly master the usage of each sub-command, because its function is really too powerful. This is simply the best intrusion tool provided by Microsoft for us. First, let's take a look at its sub-commands. Type net /? and press Enter as shown in Figure 6.
Here, we focus on mastering several sub-commands commonly used in intrusion.
net view
Use this command to view all shared resources of the remote host. The command format is net view \\IP.
net use
Map a shared resource of the remote host to a local drive letter. The graphical interface is convenient to use, he he. The command format is net use x: \\IP\sharename. The above one means mapping the directory with the shared name magic of IP 192.168.0.5 to the local drive Z. The following one means establishing an IPC$ connection with 192.168.0.7 (net use $">\\IP\IPC$ "password" /user:"name"),
After establishing the IPC$ connection, he he, you can upload files: copy nc.exe $">\\192.168.0.7\admin$, which means uploading the nc.exe in the local directory to the remote host. Combined with other DOS commands to be introduced later, intrusion can be realized.
net start
Use it to start the service on the remote host. When you establish a connection with the remote host and find that a certain service is not started and you want to use this service, use this command to start it. Usage: net start servername, as shown in Figure 9, the telnet service is successfully started.
net stop
After intrusion, if you find that a certain service of the remote host is in the way, what to do? Use this command to stop it. The usage is the same as net start.
net user
View the situations related to accounts, including creating new accounts, deleting accounts, viewing specific accounts, activating accounts, disabling accounts, etc. This is very beneficial for our intrusion. Most importantly, it provides the premise for us to clone accounts. Type net user without parameters to view all users, including disabled ones. The following explains them respectively.
1, net user abcd 1234 /add, create a user with username abcd and password 1234, and it is a member of the user group by default.
2, net user abcd /del, delete the user with username abcd.
3, net user abcd /active:no, disable the user with username abcd.
4, net user abcd /active:yes, activate the user with username abcd.
5, net user abcd, view the situation of the user with username abcd
net localgroup
View all information related to user groups and perform related operations. Type net localgroup without parameters to list all current user groups. In the intrusion process, we generally use it to promote a certain account to an administrator group account, so that we can control the entire remote host with this account. Usage: net localgroup groupname username /add.
Now we add the newly created user abcd to the administrator group. At this time, the user abcd is already a super administrator. Hehe, you can use net user abcd to view his status and compare it with Figure 10 to see. But this is too obvious. The network administrator can find the flaw as soon as he sees the user situation. So this method can only deal with novice network administrators, but we still need to know it. The current means are all to clone a super administrator that the network administrator can't see by using other tools and means. This is another story. Interested friends can refer to the article "Analyze Cloning Accounts from the Beginning" in "Hacker Defense" issue 30.
net time
This command can view the current time of the remote host. If your goal is just to enter the remote host, then maybe you don't need this command. But if a simple intrusion is successful,难道 just look at it? We need to further penetrate. This even requires knowing the current time of the remote host, because using the time and other means (which will be讲到 later) can realize the timing startup of a certain command and program, laying a good foundation for our further intrusion. Usage: net time \\IP.
Sixth, at
The function of this command is to arrange to execute a certain command and program at a specific date or time (knowing the importance of net time?). When we know the current time of the remote host, we can use this command to make it execute a certain program and command at a certain time in the future (such as 2 minutes later). Usage: at time command \\computer.
It means that at 6:55, let the computer named a-01 start the telnet service (here, net start telnet is the command to start the telnet service).
Seventh, ftp
You should be relatively familiar with this command? There are many FTP hosts open on the network, and a large part of them are anonymous, that is, anyone can log in. Now if you scan a host open with FTP service (generally a machine with port 21 open), and if you don't know how to use FTP commands, what to do? The following gives the basic usage of FTP commands.
First, type ftp and press Enter in the command line, and the FTP prompt appears. At this time, you can type "help" to view the help (this method can be used to view the help of any DOS command).
You may see that there are so many commands. How to use them? Actually, you don't need so many. Mastering a few basic ones is enough.
First is the login process, which requires using open. Just type "open host IP ftp port" directly at the FTP prompt and press Enter. Generally, the port is 21 by default and can be omitted. Then enter the legal username and password to log in. Here, take anonymous FTP as an example for introduction.
The username and password are both ftp, and the password is not displayed. When prompted **** logged in, it means that the login is successful. Here, because it is anonymous login, the user is displayed as Anonymous.
Next, the usage of specific commands will be introduced.
dir is the same as the DOS command, used to view the files on the server. Just type dir and press Enter, and you can see the files on this FTP server.
cd enter a certain folder.
get download the file to the local machine.
put upload the file to the remote server. This depends on whether the remote FTP server gives you writable permission. If yes, he he, how to use it is not多说, you can give full play by yourself.
delete delete the file on the remote FTP server. This must also ensure that you have writable permission.
bye exit the current connection.
quit the same as above.
Eighth, telnet
The powerful remote login command. Almost all intruders like to use it and it always works. Why? It's simple to operate, just like using your own machine. As long as you are familiar with DOS commands, after successfully connecting to the remote machine as an administrator, you can use it to do everything you want to do. The following introduces the usage method. First, type telnet and press Enter, then type help to view its help information.
Then type open IP and press Enter at the prompt, and then the login window appears, asking you to enter the legal username and password. The password entered here is not displayed.
When the username and password are both correct, the telnet connection is successfully established. At this time, you have the same permissions as this user on the remote host, and you can use DOS commands to do what you want to do. Here, I logged in with super administrator permissions.
Up to here, the introduction of network DOS commands is coming to an end. The purpose of this introduction is just to give novice network administrators an impression and let them know the importance of being familiar with and mastering network DOS commands. In fact, there are far more than these network-related DOS commands. This is just to whet the appetite. I hope it can be helpful to广大 novice network administrators. Learning DOS is of great help to being a good network administrator, especially being proficient in mastering some network DOS commands.
In addition, everyone should be clear that anyone must have a legal username and password to enter the system (input method vulnerabilities are almost extinct, right?). Even if you only get a very small permission of the account, you can use it to achieve the final goal. So firmly eliminate empty passwords and add a strong password to your account. This is the best way to defend against weak password intrusions.
Finally, I sincerely say, cultivating a good sense of security is the most important.
此帖被 +4 点积分 点击查看详情 评分人:【 plp626 】 | 分数: +6 | 时间:2008-3-25 16:37 | 评分人:【 jvive 】 | 分数: -2 | 时间:2008-4-1 15:01 |
|
|