LOnils风迷 's Blog

hacking for fun

BackTtack-Wiki_入门指南--Basic Usage

打算直接跳过安装,因为网上已经有很多资料了。后面开始说些工具吧,大家最关注了

======

Contents//目录

1. 登陆到BackTrack

2. 进入GUI模式

3. X不能开启

4. 连接到网络

    4.1 手动设置你的IP

    4.2 获取一个静态IP

    4.3 通过DHCP获取IP

    4.4 使用脚本获取IP

    4.5 WICD网络管理

5. 改变你ROOT用户的密码

6. 开启BackTrack常见的服务

7. 常见的apt命令

8. 常见的dpkg命令

9. 我如何通过命令查找到更多的工具信息?

=====

1. 登陆到BackTrack

BackTrack完成安装后,默认的用户名和密码为root/toor

需要注意的是,输入密码时是不回显的。

 

2. 进入GUI模式

进入BackTrack图形化界面输入 startx

 

3. X不能开启

至于X是什么大家可以百度百科(点我)

一般Xorg是开启的,如果没有成功开启。可以实用如下命令。重新配置x-server:

root@bt:~# dpkg-reconfigure xserver-xorg

如果你使用的BackTrack是kde X64使用这个命令:

root@bt:~# rm /root/.kde/cache-*

之后删除缓存文件

root@bt:~# rm -rf /var/tmp/kdecache-*

 

4. 连接到网络

    4.1 手动设置你的IP

假定我们设置的网络为

   IP Address      -  192.168.1.112/24
   Default Gateway -  192.168.1.1
   DNS server      -  192.168.1.1

我们运行如下命令:

root@bt:~# ifconfig eth0 192.168.1.112/24
root@bt:~# route add default gw 192.168.1.1
root@bt:~# echo nameserver 192.168.1.1 > /etc/resolv.conf

 

    4.2 获取一个静态IP

当然在重启启动后这样获取的IP会消失,所以我们需要编辑/etc/network/interfaces

 

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5). 

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.1.112
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

然后设置 自动启动,连接网络上

root@bt:~# update-rc.d networking defaults

root@bt:~# /etc/init.d/networking restart

 

 

    4.3 通过DHCP获取IP

直接通过dhclient 网卡  就可以了

root@bt:~# dhclient eth0
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:0c:29:81:74:21
Sending on   LPF/eth0/00:0c:29:81:74:21
Sending on   Socket/fallback
DHCPREQUEST of 192.168.1.112 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.112 from 192.168.1.1
bound to 192.168.1.112 -- renewal in 37595 seconds.
root@bt:~#

    4.4 使用脚本获取IP

root@bt:~# /etc/init.d/networking start

 

    4.5 WICD网络管理

WICD菜单在

Menu > Internet > Wicd Network Manager

当你打开时会出现错误

所以你必须重启后,在WICD开始开启之前

root@bt:~# dpkg-reconfigure wicd

root@bt:~# update-rc.d wicd defaults

现在重新启动后出现的错误就没有了。

 

5. 改变你ROOT用户的密码

修改密码是很重要的,比如在开启ssh服务时必须要修改默认的root用户的密码。

 

root@bt:~# passwd

Enter new UNIX password: {enter your new password here } 

Retype new UNIX password: {enter your new password again} 

passwd: password updated successfully

root@bt:~# 

 

6. 开启BackTrack常见的服务

BackTrack中有很多服务比如Apache, SSH, MySQL, VNC等,他们默认都是不开启的。

开启ssh

root@bt:~# sshd-generate # Specific to the SSH service - needed to generate SSH keys

root@bt:~# /etc/init.d/ssh start Starting OpenBSD Secure Shell server: sshd. 

root@bt:~# /etc/init.d/ssh stop Stopping OpenBSD Secure Shell server: sshd.

root@bt:~#

首次开启将生成一个密钥

root@bt:~# sshd-generate

你可以更新update-rc.d

root@bt:~# update-rc.d -f ssh defaults
Adding system startup for /etc/init.d/ssh ...
  /etc/rc0.d/K20ssh -> ../init.d/ssh
  /etc/rc1.d/K20ssh -> ../init.d/ssh
  /etc/rc6.d/K20ssh -> ../init.d/ssh
  /etc/rc2.d/S20ssh -> ../init.d/ssh
  /etc/rc3.d/S20ssh -> ../init.d/ssh
  /etc/rc4.d/S20ssh -> ../init.d/ssh
  /etc/rc5.d/S20ssh -> ../init.d/ssh
root@bt:~#

至于更多的服务开启详细方法,你可以查看该文章

Module 1: BackTrack Basics(第二部分 Services)

 

7. 常见的apt命令

 

apt-get install <package>         Downloads <package> and all of its dependencies, and installs or upgrades them. 

apt-get remove [--purge] <package>         Removes <package>  and any packages that depend on it. --purge specifies that packages should be purged. 

apt-get update         Updates packages listings from the repo, should be run at least once a week. 

apt-get upgrade         Upgrades all currently installed packages with those updates available from the repo. should be run once a week. 

apt-get dist-upgrade [-u]         Similar to apt-get upgrade, except that dist-upgrade will install or remove packages to satisfy dependencies. 

apt-cache search <pattern>         Searches packages and descriptions for <pattern>. 

apt-cache show <package>         Shows the full description of <package>. 

apt-cache showpkg <package>         Shows a lot more detail about <package>, and its relationships to other packages. 

man apt             Will give you more info on these commands as well as many that are in less common usage. 

 

 

8. 常见的dpkg命令

 

dpkg -i <package.deb>         Installs a package file; one that you downloaded manually, for example. 

dpkg -c <package.deb>         Lists the contents of <package.deb> a .deb file. 

dpkg -I <package.deb>         Extracts package information from <package.deb> a .deb file. 

dpkg -r <package>         Removes an installed package named <package> 

dpkg -P <package>         Purges an installed package named <package>. The difference between remove and purge is that while remove only deletes data and executables, purge also deletes all configuration files in addition. 

dpkg -L <package>         Gives a listing of all the files installed by <package>. See also dpkg -c for checking the contents of a .deb file. 

dpkg -s <package>         Shows information on the installed package <package>. See also apt-cache show for viewing package information in the Debian archive and dpkg -I for viewing package information extracted from a .deb file. 

dpkg-reconfigure <package>         Reconfigures an installed package

man dpkg         Will give you more info on these commands as well as many that are in less common usage. 

 

 

9. 我如何通过命令查找到更多的工具信息?

root@bt:~# man <command you want more info on>

root@bt:~# <program name> -help

root@bt:~# <program name> --help

root@bt:~# <program name> -h

一般的都是这些了~

评论