ä»åãããããããã³ã°ã»ã©ãã®ã¤ãããã å®å
¨ç ä»®æ³ç°å¢ã«ãããããã«ã¼ä½é¨å¦ç¿ããåèæ¸ã¨ãã¦ãã»ãã¥ãªãã£ã«ã¤ãã¦å¦ãã§ããã¾ãã
ä»åã¯ãParrotOS ã¨ãããããã¬ã¼ã·ã§ã³ãã¹ãï¼ãµã¤ãã¼æ»æææ³ã§ã·ã¹ãã ã«ä¾µå
¥ã試ã¿ããã¨ã§ã»ãã¥ãªãã£ã¬ãã«ãè©ä¾¡ããåãçµã¿ï¼åãã® OS ã®ç°å¢æ§ç¯ãè¡ãã¾ãã
åããããããã¬ã¼ã·ã§ã³ãã¹ãåãã® OS ã¨ãã¦ãKali Linux ãããã¾ãããä»åã®åèæ¸ã§ã¯ ParrotOS ã使ããã¦ãã¾ããçç±ã¯ãKali Linux ã¯ãUI ã大ããå¤ããå¾åããããæ¬ã«æ¸ããã¦ããã¨ã使ããªããªãå¯è½æ§ãé«ãããã¨æ¸ããã¦ãã¾ããã
ããã§ã¯ããã£ã¦ããã¾ãã
åèæç®
ã¯ããã«
åé ã«ãè¨ã£ãéããä»åã¯ãParrotOS ã®ã¤ã³ã¹ãã¼ã«ã¨ç°å¢æ§ç¯ãè¡ãã¾ãã
ParrotOSï¼OVAï¼ã®ã¤ã³ã¹ãã¼ã«
ParrotOS ãã¤ã³ã¹ãã¼ã«ããæ¹æ³ã¨ãã¦ãä¸è¬çãªã®ã¯ãISO ãã¡ã¤ã«ããã¦ã³ãã¼ããã¦ãã¤ãããã¤ã³ã¹ãã¼ã«ãè¡ãæ¹æ³ã ã¨æãã¾ãã
ããããä»åã¯ãOVA ãé¸æãã¾ãããçç±ã¯ãã¤ã³ã¹ãã¼ã«ä½æ¥ãä¸è¦ã§ãããã¨ã¨ãVirtualBox åãã«æé©åãã¦ãããã¨æ¸ããã¦ããããã§ãã
ãã®è¨äºã«ãOVA ã§ã¤ã³ã¹ãã¼ã«ããçµæããåé¡ããã£ãå ´åã¯ãã®å
容ãæ¸ãã¾ãã®ã§ãåèã«ãªãã°ã¨æãã¾ãã
ParrotOSï¼OVAï¼ãã¦ã³ãã¼ã
ParrotOS ã®å
¬å¼ãµã¤ãã§ãã
parrotsec.org
ã§ã¯ãæ©éãã¦ã¦ã³ãã¼ããã¾ãã
ãã®å¾ãVirtual â Security â AMD64 ãé¸ã³ãDownload ãã¯ãªãã¯ããVirtualBox ã¨åºãã®ã§ãã¯ãªãã¯ãã¾ãã
ãã¦ã³ãã¼ããããã¡ã¤ã«ã¯ãç´7.6GB ã§ããã
ãã®ãã£ããã£ã«ãã¦ã¼ã¶ï¼parrotããã¹ã¯ã¼ãï¼parrot ã¨æ¸ããã¦ãã¾ãããæ£ããã¯ãã¦ã¼ã¶ï¼userããã¹ã¯ã¼ãï¼parrot ã§ãã
ParrotOSï¼OVAï¼ã®ã¤ã³ãã¼ã
æ¢ã« VirtualBox ãå
¥ã£ã¦ãã¦ãOVAãã¡ã¤ã«ã¨é¢é£ä»ããããã¦ããã°ããã¦ã³ãã¼ããããã¡ã¤ã«ï¼Parrot-security-6.1_amd64.ovaï¼ãããã«ã¯ãªãã¯ããã¨ã¤ã³ãã¼ãã§ãã¾ãã
ãããOVAãã¡ã¤ã«ã®é¢é£ä»ããããã¦ãªãå ´åã¯ãVirtualBox ã®ã¡ãã¥ã¼ã®ãã¡ã¤ã«âä»®æ³ã¢ãã©ã¤ã¢ã³ã¹ã®ã¤ã³ãã¼ãã§åããã¨ãåºæ¥ã¾ãã
ã¤ã³ãã¼ãããã¨ã以ä¸ã®ãããªç»é¢ã«ãªãã¾ãã
CPU 㨠RAM ã¯ããããããå¯è½ãªéã大ããè¨å®ããããã«ãªã£ã¦ããããã§ããããããåèæ¸ãè¦ãã¨ãä»®æ³ãã·ã³ãè¤æ°èµ·åãã¦å®é¨ãããããªã®ã§ãããããååãã¤ï¼CPUï¼8â4ãRAMï¼8192â4096ï¼ã«æ¸ããã¾ããã
è¨å®ã決ã¾ãã°å®äºãã¯ãªãã¯ãã¾ãã
ã½ããã¦ã§ã¢ã®ä½¿ç¨è¨±è«¾ã®ç¢ºèªãåºãã®ã§ãåé¡ãªããã°åæãããã¯ãªãã¯ãã¾ãã
ãã°ããã¤ã³ãã¼ãã«æéããããã¾ããå®äºããã¨ãVirtualBox ã« Parrot OS Security Edition ã追å ããã¦ããã¨æãã¾ãã
VirtualBox ã®è¨å®ããUbuntu ã®åæè¨å®ã«ã¤ãã¦ã¯ã以ä¸ã®è¨äºã«ç´°ããæ¸ãã¦ãã¾ããè¯ãã£ããåèã«ãã¦ãã ããã
daisuke20240310.hatenablog.com
daisuke20240310.hatenablog.com
èµ·åããåã«ããã¹ãï¼Windows10ï¼ããã¢ã¯ã»ã¹ã§ããããã«ããããã¯ã¼ã¯ã«ãã¹ããªã³ãªã¼ã¢ããã¿ã追å ãã¦ããã¾ãããããã¯ã¼ã¯ã¨æ¸ãããã¨ãããã¯ãªãã¯ãã¾ãã
ã¢ããã¿ã¼1 㯠NAT ãè¨å®ããã¦ããã®ã§ãã¢ããã¿ã¼2 ãã¯ãªãã¯ãã¦ããããã¯ã¼ã¯ã¢ããã¿ã¼ãæå¹åã«ãã§ãã¯ãå
¥ãã¦ããã¹ããªã³ãªã¼ã¢ããã¿ãé¸æãã¦ãOK ãã¯ãªãã¯ãã¾ãã
ParrotOSãèµ·åãã¦è¨å®ãã
æ©é ParrotOS ãèµ·åãã¦ã¿ã¾ããããªããªãã«ãã³ãããã¹ã¯ãããã§ããã
ããã§ã¯è¨å®ãã¦ããã¾ãã
ParrotOSã®åºæ¬çãªè¨å®ãè¡ã
ParrotOS ã«é¢ããè¨å®ãè¡ã£ã¦ããã¾ãã
ã¿ã¼ããã«ã®ãã©ã³ããµã¤ãºã®å¤æ´
ã¾ããã¿ã¼ããã«ãèµ·åãã¾ãããã©ã³ãã大ããã§ãã
Edit â Profile Preferences ãã¯ãªãã¯ãã¾ãã
Use the system fixed width font ã®ãã§ãã¯ãå¤ããFont ãã¯ãªãã¯ãã¦ããµã¤ãºã 9 ã«è¨å®ãã¾ããã
ã¿ã¤ã ã¾ã¼ã³ã®è¨å®
ç¶ãã¦ãã¿ã¤ã ã¾ã¼ã³ãè¨å®ãã¾ãã
ãã¹ã¯ãããã®å·¦ä¸ã®ã¡ãã¥ã¼ã® System â Administration â Time and Date ãã¯ãªãã¯ãã¾ãã
ã¾ããUnlock ãã¯ãªãã¯ãã¦ãã¹ã¯ã¼ãï¼parrotï¼ãå
¥åããã¨ç·¨éã§ããããã«ãªãã¾ããTime zone ãã¯ãªãã¯ããã¨ãä¸çå°å³ãåºãã®ã§ãæ¥æ¬ã®æ±äº¬ããããã¯ãªãã¯ããã¨ãAsia/Tokyo ã«è¨å®ãã¦ããã¾ãã
è¨å®ã§ããã Lock ãæ¼ãã¦ãClose ãã¯ãªãã¯ãã¾ãã
ãã¼ãã¼ãã®è¨å®
次ã«ããã¼ãã¼ãã®è¨å®ãè¡ãã¾ããSystem â Preferences â Hardware â Keyboard ãã¯ãªãã¯ãã¾ãã
Layouts ãéããAdd ãã¯ãªãã¯ãã¾ããCountry ã§ãJapan ãé¸ã³ã¾ããããã¨ãVariants ã Japanese ã«ãªãã¾ããAdd ãã¯ãªãã¯ãã¾ãã
Japanese ã追å ãããã¨æãã¾ãã®ã§ããã¨ãã¨ãã£ã English (US) 㯠Remove ãã¯ãªãã¯ãã¦åé¤ãã¦ããã¾ãããã®å¾ãClose ãã¯ãªãã¯ãã¦éãã¾ãã
BASHã®è¨å®
Ubuntu ã¨éã£ã¦ã~/.bashrc ã使ããã¾ããï¼ãã¡ã¤ã«èªä½ã¯ãã¼ã ãã£ã¬ã¯ããªã«ããã®ã«ï¼ã
~/.profile ã¯èªã¿è¾¼ã¾ããã®ã§ãããã« ~/.bashrc ãèªã¾ããããã«è¨å®ãã¦ããã¾ãã
~/.profile ã®æ«å°¾ã«ã以ä¸ã追è¨ãã¾ãã
if [ -f "${HOME}/.bashrc" ]; then
. "${HOME}/.bashrc"
fi
å度ãã°ã¤ã³ãç´ãã°ã~/.bashrc ãèªã¿è¾¼ã¾ããããã«ãªãã¾ãã
ã½ããã¦ã§ã¢ã®ã¤ã³ã¹ãã¼ã«ã¨è¨å®ãè¡ã
ç¶ãã¦ãã½ããã¦ã§ã¢ã®è¨å®ãè¡ãã¾ãã
OpenSSHãµã¼ã
ãã¹ãï¼Windows10ï¼ãã SSH ã§æ¥ç¶ããããã«ãOpenSSH server ã®è¨å®ãè¡ãã¾ããæ¢ã«ã¤ã³ã¹ãã¼ã«æ¸ã¿ã®ããã§ãããéå§ãã¦ãã¾ããã®ã§ãèªåèµ·åããããã«ãã¦ãéå§ãã¾ãã
$ apt list --installed | grep -i openssh
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
openssh-client/parrot6,parrot6-security,now 1:9.2p1-2+deb12u2 amd64 [installed,automatic]
openssh-server/parrot6,parrot6-security,now 1:9.2p1-2+deb12u2 amd64 [installed,automatic]
openssh-sftp-server/parrot6,parrot6-security,now 1:9.2p1-2+deb12u2 amd64 [installed,automatic]
$ systemctl status ssh
â ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; disabled; preset: enabled)
Active: inactive (dead)
Docs: man:sshd(8)
man:sshd_config(5)
$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
Use of uninitialized value $service in hash element at /usr/sbin/update-rc.d line 26, <DATA> line 44.
insserv: warning: current start runlevel(s) (empty) of script `ssh' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (2 3 4 5) of script `ssh' overrides LSB defaults (empty).
insserv: Script `ssh' has overlapping Default-Start and Default-Stop runlevels (2 3 4 5) and (2 3 4 5). This should be fixed.
insserv: warning: current start runlevel(s) (empty) of script `ssh' overrides LSB defaults (2 3 4 5).
Use of uninitialized value $service in hash element at /usr/sbin/update-rc.d line 26, <DATA> line 44.
Created symlink /etc/systemd/system/sshd.service â /lib/systemd/system/ssh.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ssh.service â /lib/systemd/system/ssh.service.
$ sudo systemctl start ssh
ããã§ãWindows10 ãã SSH ã§æ¥ç¶ã§ããããã«ãªãã¾ããã
sambaãµã¼ã
samba ã¯ãä¸éå端ãªæãã§ã¤ã³ã¹ãã¼ã«ããã¦ãæãã§ãããstack overflow ã«ãåºã¦ã¾ããããä¸åº¦åé¤ãã¦ã¤ã³ã¹ãã¼ã«ããã°ããããã§ãã
$sudo apt install samba
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
samba : Depends: python3-samba (= 2:4.17.12+dfsg-0+deb12u1) but it is not going to be installed
Depends: samba-common (= 2:4.17.12+dfsg-0+deb12u1) but 2:4.20.2+dfsg-6~bpo12+1 is to be installed
Depends: samba-common-bin (= 2:4.17.12+dfsg-0+deb12u1) but it is not going to be installed
Depends: samba-libs (= 2:4.17.12+dfsg-0+deb12u1) but 2:4.20.2+dfsg-6~bpo12+1 is to be installed
Recommends: attr but it is not going to be installed
Recommends: python3-markdown but it is not going to be installed
Recommends: samba-vfs-modules but it is not going to be installed
Recommends: samba-ad-provision but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ sudo apt remove samba-common samba-common-bin samba-libs python3-samba
$ sudo apt install samba
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libldb2 : Breaks: samba-libs (< 2:4.19.0~) but 2:4.17.12+dfsg-0+deb12u1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
$ sudo apt remove libldb2
$ sudo apt install samba
ãªãã¨ãã¤ã³ã¹ãã¼ã«ã§ããããã§ããè¨å®ãã¦åããã¦ã¿ã¾ãã
$ sudo pdbedit -a user
new password:
retype new password:
Unix username: user
NT username:
Account Flags: [U ]
User SID: S-1-5-21-1148203777-202800493-3546339059-1000
Primary Group SID: S-1-5-21-1148203777-202800493-3546339059-513
Full Name:
Home Directory: \\PARROT\user
HomeDir Drive:
Logon Script:
Profile Path: \\PARROT\user\profile
Domain: PARROT
Account desc:
Workstations:
Munged dial:
Logon time: 0
Logoff time: Thu, 07 Feb 2036 00:06:39 JST
Kickoff time: Thu, 07 Feb 2036 00:06:39 JST
Password last set: Tue, 23 Jul 2024 22:51:39 JST
Password can change: Tue, 23 Jul 2024 22:51:39 JST
Password must change: never
Last bad password : 0
Bad password count : 0
Logon hours : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
$ sudo nano /etc/samba/smb.conf
$ sudo systemctl enable smbd.service
Synchronizing state of smbd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable smbd
Use of uninitialized value $service in hash element at /usr/sbin/update-rc.d line 26, <DATA> line 44.
insserv: warning: current start runlevel(s) (empty) of script `smbd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `smbd' overrides LSB defaults (0 1 6).
Use of uninitialized value $service in hash element at /usr/sbin/update-rc.d line 26, <DATA> line 44.
Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service â /lib/systemd/system/smbd.service.
$ sudo systemctl start smbd.service
è¨å®ãã¦ãsamba ãèªåèµ·åããããã«ãã¦ãèµ·åããã¨ãã¢ã¯ã»ã¹ã§ãã¾ããã
nanoã¨ãã£ã¿ã®ãã¼ãã¤ã³ãå¤æ´
使ã£ã¦ãã¦æ°ä»ããã®ã§ãããnanoã¨ãã£ã¿ã®ãã¼ãã¤ã³ãï¼ã·ã§ã¼ãã«ãããã¼ï¼ããUbuntu ã¨ã¯ç°ãªãã¾ããåèæ¸ã«ããã¨ãParrotOS ç¬èªã®è¨å®ã¨ã®ãã¨ã§ããããã¯ææªã§ããã
nanoã¨ãã£ã¿ã®è¨å®ãã¡ã¤ã«ã¯ã/etc/nanorc ã«ããã¾ããã¾ãã/usr/share/nano ã«ãããããè¨å®ãã¡ã¤ã«ãããããã§ãã
Ubuntu ã® /etc/nanorc ã¯ã/usr/share/nano ãåç
§ãã¦ããã®ã§ãããParrotOS ã® /etc/nanorc ã¯ã/usr/share/nano ãåç
§ãã¦ãã¾ããã§ããã
è¦æ¯ã¹ãã®ãé¢åãªã®ã§ãUbuntu ã® /etc/nanorc ã§ä¸æ¸ããã¾ãããããã¨ãUbuntu ã§ä½¿ã£ã¦ãã¨ãã¨åãæãã«ãªãã¾ãããããã§ãã ãã¶æ¥½ã«ãªãã¾ããã
netcat
ãªãããnetcatï¼ncã³ãã³ãï¼ãå
¥ã£ã¦ãã¾ããã§ããã
netcat ã¯ãããã¤ã種é¡ãããããã§ãã¨ããããããããã§ãªã¹ã¹ã¡ãã¦ãã netcat-openbsd ãå
¥ãã¦ãããã¨æãã¾ãã
$ sudo apt install netcat-openbsd
update-alternatives: using /bin/nc.openbsd to provide /bin/nc (nc) in auto mode
ncã³ãã³ãã¨ãã¦ä½¿ããããã§ãã
ããã¾ã§ã§ãã¨ãããã使ããããã«ãªãã¾ãããã¾ããå¿
è¦ã«å¿ãã¦è¿½è¨ãã¾ãã
ãããã«
ä»åã¯ãParrotOS ã¨ãã Debian ãã¼ã¹ã®ã»ãã¥ãªãã£ç¨ã® OS ãã¤ã³ã¹ãã¼ã«ãã¾ããã
次åããããããã³ã°ã»ã©ãã®ã¤ãããã å®å
¨ç ä»®æ³ç°å¢ã«ãããããã«ã¼ä½é¨å¦ç¿ ãèªã¿ãªãããã»ãã¥ãªãã£ã®ç解ãé²ãã¦ããããã¨æãã¾ãã
æå¾ã«ãªãã¾ããããã¨ã³ã¸ãã¢ã°ã«ã¼ãã®ã©ã³ãã³ã°ã«åå ä¸ã§ãã
æ°æ¥½ã«ãããã¨ãããããé¡ããããã¾ãð
ä»åã¯ä»¥ä¸ã§ãï¼
æå¾ã¾ã§ãèªã¿ããã ãããããã¨ããããã¾ããã