주요 명령어
apt-get install ftp
apt-get install -y vsftpd
vi /etc/vsftpd.conf
service vsftpd start
ls -al /var/log/vsftpd.log
Next
acct allo 명령어 실습을 해보는 것이 목표였는데 안보인다. 찾아보자.
상세 실습 로그
─# apt-get install ftp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ftp is already the newest version (20230507-2).
ftp set to manually installed.
The following packages were automatically installed and are no longer required:
libmongocrypt0 libncurses5 libtinfo5 pipewire-alsa python3-jaraco.classes python3-pytz-deprecation-shim python3-texttable
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded.
─# apt-get install -y vsftpd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libmongocrypt0 libncurses5 libtinfo5 pipewire-alsa python3-jaraco.classes python3-pytz-deprecation-shim python3-texttable
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
vsftpd
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 142 kB of archives.
After this operation, 351 kB of additional disk space will be used.
Get:1 http://http.kali.org/kali kali-rolling/main amd64 vsftpd amd64 3.0.3-13+b2 [142 kB]
Fetched 142 kB in 6s (24.7 kB/s)
Preconfiguring packages ...
Selecting previously unselected package vsftpd.
(Reading database ... 397469 files and directories currently installed.)
Preparing to unpack .../vsftpd_3.0.3-13+b2_amd64.deb ...
Unpacking vsftpd (3.0.3-13+b2) ...
Setting up vsftpd (3.0.3-13+b2) ...
update-rc.d: We have no instructions for the vsftpd init script.
update-rc.d: It looks like a network service, we disable it.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for kali-menu (2023.3.3) ...
┌──(root㉿kali)-[/etc]
└─# ls -al *ftp*
-rw-r--r-- 1 root root 132 May 7 2014 ftpusers
-rw-r--r-- 1 root root 5850 Oct 16 2022 vsftpd.conf
┌──(root㉿kali)-[/etc]
└─# vi /etc/vsftpd.conf
┌──(root㉿kali)-[/etc]
└─# service vsftpd start
┌──(root㉿kali)-[/etc]
└─# service vsftpd status
● vsftpd.service - vsftpd FTP server
Loaded: loaded (/lib/systemd/system/vsftpd.service; disabled; preset: disabled)
Active: active (running) since Mon 2023-07-17 07:48:12 EDT; 8s ago
Process: 5402 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
Main PID: 5403 (vsftpd)
Tasks: 1 (limit: 4593)
Memory: 876.0K
CPU: 7ms
CGroup: /system.slice/vsftpd.service
└─5403 /usr/sbin/vsftpd /etc/vsftpd.conf
Jul 17 07:48:12 kali systemd[1]: Starting vsftpd.service - vsftpd FTP server...
Jul 17 07:48:12 kali systemd[1]: Started vsftpd.service - vsftpd FTP server.
┌──(root㉿kali)-[/etc]
└─# nmap localhost
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-17 07:48 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000023s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 998 closed tcp ports (reset)
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds
┌──(root㉿kali)-[/etc]
└─# ftp
ftp> open localhost
Trying [::1]:21 ...
Connected to localhost.
220 (vsFTPd 3.0.3)
Name (localhost:root): kali
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> help
Commands may be abbreviated. Commands are:
! cdup epsv4 hash mdelete mput pdir quote rmdir struct user
$ chmod epsv6 help mdir mreget pls rate rstatus sunique verbose
account close exit idle mget msend pmlsd rcvbuf runique system xferbuf
append cr features image mkdir newer preserve recv send tenex ?
ascii debug fget lcd mls nlist progress reget sendport throttle
bell delete form less mlsd nmap prompt remopts set trace
binary dir ftp lpage mlst ntrans proxy rename site type
bye disconnect gate lpwd mode open put reset size umask
case edit get ls modtime page pwd restart sndbuf unset
cd epsv glob macdef more passive quit rhelp status usage
┌──(root㉿kali)-[/etc]
└─# ls -al /var/log/vsftpd.log
-rw------- 1 root root 124 Jul 17 07:53 /var/log/vsftpd.log
┌──(root㉿kali)-[/etc]
└─# cat /var/log/vsftpd.log
Mon Jul 17 07:52:46 2023 [pid 5439] CONNECT: Client "::1"
Mon Jul 17 07:53:00 2023 [pid 5438] [kali] OK LOGIN: Client "::1"
'정보보안기사 > linux' 카테고리의 다른 글
[실습] http #1 OPTIONS (0) | 2023.07.19 |
---|---|
[실습] finger 서비스 비활성화 (0) | 2023.07.18 |
[kali] DNS 서버 구성 실습 (0) | 2023.07.17 |
칼리 리눅스 재구성(2023-07-26) (0) | 2023.07.16 |
좀비 프로세스 확인 방법 (0) | 2023.07.13 |