信息安全Linux之pikachu

┌──(kali㉿kali)-[~]
└─$ docker
Command 'docker' not found, but can be installed with:
sudo apt install docker.io    
sudo apt install podman-docker
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo apt-get install docker.io
[sudo] password for kali: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cgroupfs-mount containerd criu libintl-perl libintl-xs-perl
  libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl
  libsort-naturally-perl needrestart runc tini
Suggested packages:
  containernetworking-plugins docker-doc aufs-tools btrfs-progs debootstrap
  rinse rootlesskit xfsprogs zfs-fuse | zfsutils-linux
The following NEW packages will be installed:
  cgroupfs-mount containerd criu docker.io libintl-perl libintl-xs-perl
  libmodule-find-perl libmodule-scandeps-perl libproc-processtable-perl
  libsort-naturally-perl needrestart runc tini
0 upgraded, 13 newly installed, 0 to remove and 364 not upgraded.
Need to get 66.6 MB of archives.
After this operation, 269 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 runc amd64 1.1.4+ds1-1+b3 [2,707 kB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 containerd amd64 1.6.18~ds1-1+b2 [25.9 MB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 tini amd64 0.19.0-1 [255 kB]
Get:4 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 docker.io amd64 20.10.23+dfsg1-1+b3 [36.2 MB]
Get:5 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 cgroupfs-mount all 1.4 [6,276 B]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 criu amd64 3.17.1-2 [665 kB]
Get:7 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libintl-perl all 1.33-1 [720 kB]
Get:8 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libintl-xs-perl amd64 1.33-1 [15.6 kB]
Get:9 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libmodule-find-perl all 0.16-2 [10.6 kB]
Get:10 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libmodule-scandeps-perl all 1.31-2 [41.7 kB]
Get:11 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libproc-processtable-perl amd64 0.634-1+b2 [43.1 kB]
Get:12 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 libsort-naturally-perl all 1.03-4 [13.1 kB]
Get:13 https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling/main amd64 needrestart all 3.6-3 [59.3 kB]
Fetched 66.6 MB in 16s (4,040 kB/s)                                         
Selecting previously unselected package runc.
(Reading database ... 392716 files and directories currently installed.)
Preparing to unpack .../00-runc_1.1.4+ds1-1+b3_amd64.deb ...
Unpacking runc (1.1.4+ds1-1+b3) ...
Selecting previously unselected package containerd.
Preparing to unpack .../01-containerd_1.6.18~ds1-1+b2_amd64.deb ...
Unpacking containerd (1.6.18~ds1-1+b2) ...
Selecting previously unselected package tini.
Preparing to unpack .../02-tini_0.19.0-1_amd64.deb ...
Unpacking tini (0.19.0-1) ...
Selecting previously unselected package docker.io.
Preparing to unpack .../03-docker.io_20.10.23+dfsg1-1+b3_amd64.deb ...
Unpacking docker.io (20.10.23+dfsg1-1+b3) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../04-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package criu.
Preparing to unpack .../05-criu_3.17.1-2_amd64.deb ...
Unpacking criu (3.17.1-2) ...
Selecting previously unselected package libintl-perl.
Preparing to unpack .../06-libintl-perl_1.33-1_all.deb ...
Unpacking libintl-perl (1.33-1) ...
Selecting previously unselected package libintl-xs-perl.
Preparing to unpack .../07-libintl-xs-perl_1.33-1_amd64.deb ...
Unpacking libintl-xs-perl (1.33-1) ...
Selecting previously unselected package libmodule-find-perl.
Preparing to unpack .../08-libmodule-find-perl_0.16-2_all.deb ...
Unpacking libmodule-find-perl (0.16-2) ...
Selecting previously unselected package libmodule-scandeps-perl.
Preparing to unpack .../09-libmodule-scandeps-perl_1.31-2_all.deb ...
Unpacking libmodule-scandeps-perl (1.31-2) ...
Selecting previously unselected package libproc-processtable-perl:amd64.
Preparing to unpack .../10-libproc-processtable-perl_0.634-1+b2_amd64.deb ...
Unpacking libproc-processtable-perl:amd64 (0.634-1+b2) ...
Selecting previously unselected package libsort-naturally-perl.
Preparing to unpack .../11-libsort-naturally-perl_1.03-4_all.deb ...
Unpacking libsort-naturally-perl (1.03-4) ...
Selecting previously unselected package needrestart.
Preparing to unpack .../12-needrestart_3.6-3_all.deb ...
Unpacking needrestart (3.6-3) ...
Setting up runc (1.1.4+ds1-1+b3) ...
Setting up libmodule-find-perl (0.16-2) ...
Setting up tini (0.19.0-1) ...
Setting up libproc-processtable-perl:amd64 (0.634-1+b2) ...
Setting up criu (3.17.1-2) ...
Setting up libintl-perl (1.33-1) ...
Setting up cgroupfs-mount (1.4) ...
update-rc.d: We have no instructions for the cgroupfs-mount init script.
update-rc.d: It looks like a non-network service, we enable it.
Setting up containerd (1.6.18~ds1-1+b2) ...
containerd.service is a disabled or a static unit, not starting it.
Setting up libsort-naturally-perl (1.03-4) ...
Setting up libmodule-scandeps-perl (1.31-2) ...
Setting up needrestart (3.6-3) ...
Setting up docker.io (20.10.23+dfsg1-1+b3) ...
Adding group `docker' (GID 142) ...
Done.
update-rc.d: We have no instructions for the docker init script.
update-rc.d: It looks like a non-network service, we enable it.
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Setting up libintl-xs-perl (1.33-1) ...
Processing triggers for libc-bin (2.36-8) ...
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for kali-menu (2023.1.7) ...
                                                                             
┌──(kali㉿kali)-[~]
└─$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker pull area39/pikachu
Using default tag: latest
latest: Pulling from area39/pikachu

等待

在敲一遍

┌──(kali㉿kali)-[~]
└─$ sudo docker pull area39/pikachu
Using default tag: latest
latest: Pulling from area39/pikachu
Digest: sha256:e9748879af76b68235a6ec66ce28b048323ac31f7f33065d83727cacb3998e05
Status: Image is up to date for area39/pikachu:latest
docker.io/area39/pikachu:latest
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker run  area39/pikachu
sed: can't read /etc/php/7.2/apache2/php.ini: No such file or directory
rm: cannot remove '/var/run/mysqld/mysqld.sock': No such file or directory
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Waiting for confirmation of MySQL service startup
=> Creating MySQL admin user with

sudo docker pull area39/pikachu
Using default tag: latest
latest: Pulling from area39/pikachu
Digest: sha256:e9748879af76b68235a6ec66ce28b048323ac31f7f33065d83727cacb3998e05
Status: Image is up to date for area39/pikachu:latest
docker.io/area39/pikachu:latest

//说明pikachu已经拉完了

>docker run aera39/pikachu

//让它跑起来

sudo docker run area39/pikachu

把本地配置都拉进来
Ctrl+c可以中断

sudo docker run -d area39/pikachu
//可以让它sudo docker run area39/pikachu后台运行

                                                                           
┌──(kali㉿kali)-[~]
└─$ sudo docker run  area39/pikachu
sed: can't read /etc/php/7.2/apache2/php.ini: No such file or directory
rm: cannot remove '/var/run/mysqld/mysqld.sock': No such file or directory
=> An empty or uninitialized MySQL volume is detected in /var/lib/mysql
=> Installing MySQL ...
=> Done!
=> Waiting for confirmation of MySQL service startup
=> Creating MySQL admin user with random password
ERROR 1133 (42000) at line 1: Can't find any matching row in the user table
=> Done!
========================================================================
You can now connect to this MySQL Server with JiTqUNj1fNEm

    mysql -uadmin -pJiTqUNj1fNEm -h<host> -P<port>

Please remember to change the above password as soon as possible!
MySQL user 'root' has no password but only allows local connections

enjoy!
========================================================================
/usr/lib/python2.7/dist-packages/supervisor/options.py:298: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2023-04-07 11:34:23,904 CRIT Supervisor running as root (no user in config file)
2023-04-07 11:34:23,904 INFO Included extra file "/etc/supervisor/conf.d/supervisord-apache2.conf" during parsing
2023-04-07 11:34:23,904 INFO Included extra file "/etc/supervisor/conf.d/supervisord-mysqld.conf" during parsing
2023-04-07 11:34:23,946 INFO RPC interface 'supervisor' initialized
2023-04-07 11:34:23,947 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-04-07 11:34:23,948 INFO supervisord started with pid 1
2023-04-07 11:34:24,955 INFO spawned: 'mysqld' with pid 501
2023-04-07 11:34:24,963 INFO spawned: 'apache2' with pid 502
2023-04-07 11:34:25,956 INFO success: mysqld entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2023-04-07 11:34:25,956 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
^C2023-04-07 11:39:42,075 WARN received SIGINT indicating exit request
2023-04-07 11:39:42,081 INFO waiting for mysqld, apache2 to die
2023-04-07 11:39:42,199 INFO stopped: apache2 (exit status 0)
2023-04-07 11:39:45,209 INFO waiting for mysqld to die
2023-04-07 11:39:48,218 INFO waiting for mysqld to die
2023-04-07 11:39:51,229 INFO waiting for mysqld to die
2023-04-07 11:39:52,232 WARN killing 'mysqld' (501) with SIGKILL
2023-04-07 11:39:52,234 INFO stopped: mysqld (terminated by SIGKILL)
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker ps                 
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker run -d  area39/pikachu
79ece73448a127ae04da18ee77f147005c5a61d0c3d8db234591ffc23b03c11c
                                                                             
┌──(kali㉿kali)-[~]
└─$ sudo docker ps                    
CONTAINER ID   IMAGE            COMMAND     CREATED         STATUS         PORTS              NAMES
79ece73448a1   area39/pikachu   "/run.sh"   5 seconds ago   Up 4 seconds   80/tcp, 3306/tcp   reverent_williams
┌──(kali㉿kali)-[~/Desktop/pikachu]
└─$ sudo docker build -t "pikachu" .     
[sudo] password for kali: 
Sending build context to Docker daemon  7.028MB
Step 1/3 : FROM mattrayner/lamp
latest: Pulling from mattrayner/lamp
35807b77a593: Pull complete 
ccfecfa17ed6: Pull complete 
499764c8dc6b: Pull complete 
c6b0ddc4cdc0: Pull complete 
8ae8ee891eaf: Pull complete 
510e2baf4b24: Pull complete 
4103a3ecbaab: Pull complete 
3066e34dc7b7: Pull complete 
b626f562f102: Pull complete 
fad4a5a21cfc: Pull complete 
9c2a40162cc1: Pull complete 
a8b002eab6c2: Pull complete 
cda2d831f3ac: Pull complete 
36cd807eb11e: Pull complete 
7418cc89daa3: Pull complete 
c5690feb59a2: Pull complete 
b836b3984976: Pull complete 
078cd7ee493e: Pull complete 
1c368befafd5: Pull complete 
7ed553304ebc: Pull complete 
eca287b55180: Pull complete 
cd928c8d6aad: Pull complete 
e199caef4ca7: Pull complete 
aca8e22d2fca: Pull complete 
Digest: sha256:f7caeba589eaea7e3d20f4ae3e3bf88233e66e7df59eb5adb49161a5365f9f90
Status: Downloaded newer image for mattrayner/lamp:latest
 ---> c15726116aef
Step 2/3 : COPY . /app/
 ---> f76754273e32
Step 3/3 : CMD ["/run.sh"]
 ---> Running in 565c4ae3ff84
Removing intermediate container 565c4ae3ff84
 ---> 4f0960e0521d
Successfully built 4f0960e0521d
Successfully tagged pikachu:latest
                                                                             
┌──(kali㉿kali)-[~/Desktop/pikachu]
└─$ sudo docker ps                  
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
                                                                             
┌──(kali㉿kali)-[~/Desktop/pikachu]
└─$ sudo docker run -d -p8080:80 pikachu 
324fd60c9fe88671392eb718cc84c77e52abf40d30de4001d326e6e9bceb746c
                                                                             
┌──(kali㉿kali)-[~/Desktop/pikachu]
└─$ 

 febb15a2f7784a86b1ea116ce6e7da66.png

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值