task1:Introduction 介绍
Everyone prefers a graphical user interface (GUI) until they master a command-line interface (CLI). There are many reasons for that. One reason is that GUIs are usually intuitive. If someone offers you a GUI interface you are unfamiliar with, you can quickly poke around and discover a non-trivial part. Compare this with dealing with a CLI, i.e., a prompt.
每个人都喜欢图形用户界面 (GUI),直到他们掌握了命令行界面 (CLI)。这有很多原因。一个原因是 GUI 通常很直观。如果有人为您提供您不熟悉的 GUI 界面,您可以快速浏览并发现一个重要的部分。将此与处理 CLI(即提示符)进行比较。
CLI interfaces usually have a learning curve; however, as you master the command line, you will find it faster and more efficient. Consider this trivial example: How many clicks do you need to find your IP address using the graphical desktop? Using the command-line interface, you don’t even need to raise your hands off the keyboard. Let’s say you want to recheck your IP address. You need to issue the same command instead of moving the mouse pointer to every corner of your screen.
CLI 界面通常有一个学习曲线;但是,当您掌握命令行时,您会发现它更快、更高效。考虑这个简单的示例:您需要点击多少次才能使用图形桌面找到您的 IP 地址?使用命令行界面,您甚至不需要将手从键盘上抬起。假设您要重新检查您的 IP 地址。您需要发出相同的命令,而不是将鼠标指针移动到屏幕的每个角落。
There are many other advantages to using a CLI besides speed and efficiency. We will mention a few:
除了速度和效率之外,使用 CLI 还有许多其他优势。我们将提到一些:
- Lower resource usage: CLIs require fewer system resources than graphics-intensive GUIs. In other words, you can run your CLI system on older hardware or systems with limited memory. If you are using cloud computing, your system will require lower resources, which in turn will lower your bill.
降低资源使用量:CLI 需要的系统资源比图形密集型 GUI 少。换句话说,您可以在较旧的硬件或内存有限的系统上运行 CLI 系统。如果您使用的是云计算,您的系统将需要更少的资源,这反过来又会降低您的费用。 - Automation: While you can automate GUI tasks, creating a batch file or script with the commands you need to repeat is much easier.
自动化: 虽然您可以自动执行 GUI 任务,但使用需要重复的命令创建批处理文件或脚本要容易得多。 - Remote management: CLI makes it very convenient to use SSH to manage a remote system such as a server, router, or an IoT device. This approach works well on slow network speeds and systems with limited resources.
远程管理:CLI 使使用 SSH 管理远程系统(如服务器、路由器或 IoT 设备)变得非常方便。此方法适用于网络速度较慢和资源有限的系统。
Learning Objectives 学习目标
The purpose of this room is to teach you how to use MS Windows Command Prompt cmd.exe, the default command-line interpreter in the Windows environment. We will learn how to use the command line to:
这个房间的目的是教你如何使用 MS Windows Command Prompt cmd.exe,这是 Windows 环境中的默认命令行解释器。我们将学习如何使用命令行来:
- Display basic system information
显示基本系统信息 - Check and troubleshoot network configuration
检查网络配置并排除故障 - Manage files and folders 管理文件和文件夹
Check running processes 检查正在运行的进程
Room Prerequisites 会议室先决条件
Before starting this room, you should have finished the Windows and AD Fundamentals module.
在开始此聊天室之前,您应该已完成 Windows 和 AD 基础知识模块。
。。。。连接机器。。。。。。
Establishing an SSH Connection from the AttackBox 从 AttackBox 建立 SSH 连接
f this is the first time you initiate an SSH connection from the AttackBox to a target system, the steps are shown in the screenshot below, and they are the following:
如果这是您第一次启动从 AttackBox 到目标系统的 SSH 连接,则下面的屏幕截图显示了这些步骤,它们如下:
- Start the AttackBox’s terminal by clicking the terminal icon marked with 1.
通过单击标有 1 的终端图标启动 AttackBox 的终端。 - To connect to the target VM, issue the command ssh user@MACHINE_IP as user is the username in this case.
要连接到目标 VM,请发出命令 ssh user@MACHINE_IP as user 在本例中为用户名。 - Because this is your first time connecting to this target VM, you will be asked to trust this connection. Answer with yes as marked with 3.
由于这是您第一次连接到此目标 VM,因此系统会要求您信任此连接。回答 Yes,用 3 标记。 - Enter your password Tryhackme123!. Please note that the password will not appear as you type it.
输入您的密码 Tryhackme123!。请注意,您键入密码时不会显示密码