Debian初体验之基础设置

发布时间 2023-10-24 12:06:03作者: CarlZeng
layout: 0模版
title: Debian初体验之基础设置
date: 2023-10-17 19:18:56
tags: [debian, 软路由, aircrack-ng]
categories: Debian
学习J4125软路由里面的Debian 11,包含Debian连接NAS的远程目录 尝试debian启动桌面,安装VNC远程控制,运行aircrack-ng跑包等等... Debian远程执行,连接NAS的远程目录(装载字典)

如何开启debian的ssh远程管理?

https://www.xxlxy.com/153.html

如何查看debian的磁盘信息

lsblk

debian 如何启动桌面(debian 桌面)

使用这个工具:tasksel,用来配置/安装桌面系统
选择那个一个桌面?
Gnome一步到位,不想要遇到xface的奔溃机率(踩雷,排雷)

Retrieving file 10 of 1173 (7h 12min 16s remaining)
简直搞笑了

如何Debian切换源,来加速安装?

可以通过编辑 /etc/apt/sources.list 文件来更改Debian源
使用了‘阿里云源‘ at https://developer.aliyun.com/article/765348

查看:debian服务器已完成安装Gnome,如何开启

# 使开机启动进入图形界面
systemctl set-default graphical.target

reboot后,依旧无法引导进入图形界面(GUI模式)

startx

    (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
    (EE) Server terminated with error (1). Closing log file.

安装VNC

root@Debian11:/etc/default# sudo apt install tigervnc-standalone-server 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libfile-readbackwards-perl tigervnc-common
The following NEW packages will be installed:
  libfile-readbackwards-perl tigervnc-common tigervnc-standalone-server
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1127 kB of archives.
After this operation, 3148 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ftp.debian.org/debian bullseye/main amd64 libfile-readbackwards-perl all 1.05-2 [12.2 kB]
Get:2 http://ftp.debian.org/debian bullseye/main amd64 tigervnc-common amd64 1.11.0+dfsg-2+deb11u1 [108 kB]
Get:3 http://ftp.debian.org/debian bullseye/main amd64 tigervnc-standalone-server amd64 1.11.0+dfsg-2+deb11u1 [1006 kB]

双双放弃,不用GUI,直接安装:包
https://github.com/conwnet/wpa-dictionary#linux-篇recommended--推荐

sudo apt install aircrack-ng



sudo mkdir /mnt/nas

sudo apt-get install cifs-utils


sudo mount -t cifs //192.168.6.203/KingchuxingSSD512G /mnt/nas -o username=carl,password=******

思路切换:用BT来管理Debian,不需要GUI了
内网面板地址: https://192.168.6.116:36430/8fef4036
username: ******
password: ******

sudo mount -t cifs -o rw,vers=3.0 //192.168.6.203/KingchuxingSSD512G /mnt/nas -o username=carl,password==******

works

debian 跑aircrack-ng
Aircrack-ng无线破解总结
Linux 云服务器aircrack-ng后台跑包并用邮件发送结果

aircrack-ng ./handshake/...cap -w ./pass/1d.txt

手机号字典生成器:可以根据用户需求定制化生成中国各大运营商和指定区域的手机号字典。
https://github.com/asaotomo/makephonedict

疑惑:aircrack-ng跑出来或者没有跑出来,区别在哪里

1. ewsa跑包
2. hashcat
    hashcat破解握手包密码
    //用aircrack-ng把cap转换成hccap类型数据包
    aircrack-ng <input.cap> -J <out.hccap>
    //用hashcat破解WPA/PSK密码( -m 2500为破解的模式为WPA/PSK方式)
    hashcat -m 2500 testap.hccap pass.txt
3. aircrack-ng [cap包] -w [字典路径]

开启SSH并新增Debian用户

BT面板中 > 安全 > SSH管理 > SSH开关
https://192.168.6.116:36430/firewall

debian新增一个管理用户
$ sudo adduser {username}
$ sudo passwd {username} #已被adduser默认包含了

将用户添加成为 sudo 用户
$ sudo usermod -aG sudo {username}

删除用户
sudo deluser --remove-home {username}