Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 git clone https://github.com/sandervanvugt/bash-scripting
- 2 cd bash-scripting/
- 3 ls
- 4 vim script1
- 5 script1
- 6 echo $PATH
- 7 exit
- 8 echo $PATH
- 9 ./script1
- 10 cd bash-scripting/
- 11 ./script1
- 12 ls -l
- 13 chmod +x script1
- 14 ./script1
- 15 cat script1
- 16 ls -l script1
- 17 echo $?
- 18 ls kiwhgiughwiurghv
- 19 echo $?
- 20 ./script1
- 21 bash script1
- 22 sh script1
- 23 cat script1
- 24 history
- 25 chmod -x script1
- 26 bash script1
- 27 ./script1
- 28 chmod +x script1
- 29 sh script1
- 30 which sh
- 31 which bash
- 32 ls -l /usr/bin/sh /usr/bin/bash
- 33 vim script2
- 34 ./script2
- 35 chmod +x script*
- 36 ./script2
- 37 cat script2
- 38 pwd
- 39 vim script2
- 40 source script2
- 41 cat /etc/os-release
- 42 cat /etc/redhat-release
- 43 getenforce
- 44 ls -alZ
- 45 yum install -y httpd
- 46 cd /var/www/html/
- 47 vim index.html
- 48 systemctl enable --now httpd
- 49 curl http://localhost
- 50 ps Zaux | grep httpd
- 51 ls -Z /var/www
- 52 ls -Zd /var/tmp
- 53 semanage fcontext -l
- 54 semanage fcontext -l | wc
- 55 history
- 56 mkdir /web
- 57 cd /web
- 58 vim index.html
- 59 vim /etc/httpd/conf/httpd.conf
- 60 systemctl restart httpd
- 61 curl http://localhost
- 62 getenforce
- 63 setenforce permissive
- 64 curl http://localhost
- 65 history
- 66 vim /etc/httpd/conf/httpd.conf
- 67 systemctl restart httpd
- 68 curl http://localhost
- 69 vim /etc/httpd/conf/httpd.conf
- 70 systemctl restart httpd
- 71 curl http://localhost
- 72 setenforce enforcing
- 73 curl http://localhost
- 74 ls -ldZ .
- 75 ps Zaux | grep http
- 76 grep AVC /var/log/audit/audit.log
- 77 history
- 78 yum provides */semanage
- 79 cat ~/.bash_history | nc termbin.com 9999
- 80 reboot
- 81 history
- 82 head ~/.bash_history
- 83 cd bash-scripting/
- 84 ./countdown 5
- 85 cd ..
- 86 less .bash_history
- 87 history | less
- 88 history
- 89 cat ~/.bash_history | nc termbin.com 9999
- 90 git clone https://github.com/SELinuxProject/refpolicy
- 91 git clone https://github.com/sandervanvugt/selinux
- 92 cd selinux/
- 93 ls
- 94 cd ..
- 95 sestatus
- 96 cd /etc/selinux/
- 97 ls
- 98 cat config
- 99 history | nc termin.com 9999
- 100 history | nc termbin.com 9999
- 101 cd ..
- 102 ls -lZda /web
- 103 ps Zaux
- 104 ps -eZ | grep dbus-daemon
- 105 man semanage
- 106 cd /web
- 107 ls -Zd /web
- 108 grep AVC /var/log/audit/audit.log
- 109 semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?"
- 110 ls -Zd /web
- 111 cd /etc/selinux/
- 112 ls
- 113 cd targeted/
- 114 ls
- 115 cd contexts/
- 116 ls
- 117 cd files/
- 118 ls
- 119 ls -l
- 120 cat file_contexts.local
- 121 restorecon -Rv /web
- 122 history
- 123 man semanage-fcontext
- 124 cd /web
- 125 touch hello
- 126 ls -Z
- 127 mkdir subdir
- 128 cd subdir/
- 129 touch whocars
- 130 ls -Z
- 131 cd
- 132 getenforce
- 133 semanage fcontext -l | less
- 134 seinfo -t
- 135 seinfo -t | wc
- 136 man -k _selinux
- 137 yum install selinux-policy-doc
- 138 man -k _selinux
- 139 man -k _selinux | wc
- 140 man -k _selinux | grep http
- 141 man httpd_selinux
- 142 man zebra_selinux
- 143 vim /etc/ssh/sshd_config
- 144 systemctl restart sshd
- 145 systemctl status sshd
- 146 journalctl -xe
- 147 grep AVC /var/log/audit/audit.log
- 148 vim /etc/ssh/sshd_config
- 149 semanage port -a -t ssh_port_t -p tcp 2022
- 150 systemctl restart sshd
- 151 semanage boolean -l
- 152 semanage boolean -l | wc
- 153 semanage boolean -l | grep fto
- 154 semanage boolean -l | grep ftp
- 155 setsebool -P ftpd_anon_write on
- 156 semanage boolean -l | grep ftp
- 157 ls
- 158 cd bash-scripting/
- 159 ./countdown 13
- 160 cd
- 161 grep sealert /var/log/messages
- 162 grep sealert /var/log/messages | grep httpd
- 163 sealert -l f24f56bc-6fe5-4fb1-ae10-97a182526f31 | less
- 164 grep sealert /var/log/messages
- 165 sealert -l 407a72f6-b6c8-4e43-9756-67a8cf13f536 | less
- 166 yum provides */sesearch
- 167 rpm -ql setools-console
- 168 sesearch -b ftpd_anon_write -A
- 169 getsebool -a | grep ftp
- 170 sesearch -b ftpd_full_access -A
- 171 sesearch -b ftpd_anon_write -p read -AC
- 172 sesearch -b ftpd_anon_write -p read -A
- 173 sesearch -s httpd_t -t user_home_t -p read -A
- 174 getsebool -a | grep ttp | grep nable
- 175 history
- 176 ps Zaux | grep http
- 177 sesearcg -A | grep httpd_t
- 178 sesearch -A | grep httpd_t
- 179 sesearch -A | grep httpd_t | wc
- 180 sesearch -A | wc
- 181 ldd $(which passwd)
- 182 reboot
- 183 semanage permissive -a httpd_t
- 184 mkdir /new
- 185 vim /new/index.html
- 186 vim /etc/httpd/conf/httpd.conf
- 187 systemctl restart httpd
- 188 curl http://localhost
- 189 getenforce
- 190 semanage permissive -l
- 191 semanage permissive -d httpd_t
- 192 semanage permissive -l
- 193 curl http://localhost
- 194 sestatus | grep deny
- 195 vim /etc/selinux/semanage.conf
- 196 vim /etc/sysconfig/selinux
- 197 seinfo -tunconfined_t
- 198 ls
- 199 cd bash-scripting/
- 200 ./countdown 18
- 201 cd
- 202 semodule -l
- 203 grep http /var/log/audit/audit.log | audit2allow -M mypolicy
- 204 ls
- 205 vim mypolicy.te
- 206 semodule -i mypolicy.pp
- 207 semodule --help
- 208 ls
- 209 cd refpolicy/
- 210 ls
- 211 cd policy/
- 212 ls
- 213 cd modules/
- 214 ls
- 215 cd services/
- 216 ls
- 217 vim zebra.te
- 218 vim zebra.fc
- 219 grep AVC /var/log/audit/audit.log
- 220 seinfo -c
- 221 seinfo -cfile -x
- 222 grep AVC /var/log/audit/audit.log | grep http > ~/http-in.txt
- 223 cd
- 224 vim http-in.txt
- 225 audit2allow -M myhpp < http-in.txt
- 226 ls
- 227 vim sander.te
- 228 vim sander.fc
- 229 mkdir /opt/sander
- 230 touch /opt/sander/file1
- 231 ls -lZ /opt/sander/file1
- 232 ls -lZ /opt
- 233 checkmodule -M -m -o sander.mod sander.te
- 234 vim sander.te
- 235 checkmodule -M -m -o sander.mod sander.te
- 236 ls
- 237 ls -l sander*
- 238 semodule_package -o sander.pp -m sander.mod -f sander.fc
- 239 semodule -i sander.pp
- 240 ls -lZ /opt/sander
- 241 restorecon -Rv /opt/sander
- 242 history | grep history
- 243 history | nc termbin.com 9999
- 244 semanage user -l
- 245 useradd linda
- 246 id -Z linda
- 247 su - linda
- 248 semanage login -a -s user_u linda
- 249 su - linda
- 250 semanage login -l
- 251 su - linda
- 252 cd bash-scripting/
- 253 ./countdown 12
- 254 grep AVC /var/log/audit/audit.log
- 255 pstree -Z | grep -e ^systemd -e httpd
- 256 sepolicy transition -s sshd_t -t unconfined_t
- 257 cd ../refpolicy/policy/modules/services/
- 258 ls
- 259 vim zebra.fc
- 260 cd /usr/share/doc/selinux-policy/
- 261 ls
- 262 vim example.fc
- 263 vim example.te
- 264 make -f /usr/share/selinux/devel/Makefile myapp.pp
- 265 make -f /usr/share/selinux/devel/Makefile example.pp
- 266 pwd
- 267 cd
- 268 cd selinux/
- 269 ls
- 270 vim server.php
- 271 ./setup-rot.sh
- 272 sepolgen --application startrot
- 273 vim startrot.te
- 274 vim startrot.fc
- 275 yum install -y vsftpd
- 276 runcon -u system_u -r system_r -t httpd_t vsftpd
- 277 grep sealert /var/log/messages
- 278 sealert -l 96b15e83-c300-4b58-a6aa-18ee890c1e37 | less
- 279 # ausearch -c 'runcon' --raw | audit2allow -M my-runcon
- 280 # semodule -X 300 -i my-runcon.pp
- 281 ausearch -c 'runcon' --raw | audit2allow -M my-runcon
- 282 semodule -X 300 -i my-runcon.pp
- 283 runcon -u system_u -r system_r -t httpd_t vsftpd
- 284 ps Zaux | grep vsft
- 285 grep sealert /var/log/messages
- 286 sealert -l 39a4d1a1-3bc0-429e-9532-cea33009b987 | ;ess
- 287 sealert -l 39a4d1a1-3bc0-429e-9532-cea33009b987 | less
- 288 setsebool -P domain_can_mmap_files 1
- 289 runcon -u system_u -r system_r -t httpd_t vsftpd
- 290 grep sealert /var/log/messages
- 291 sealert -l b475f4e5-87d6-48a0-8b7a-6a52cfa2f14c | less
- 292 # ausearch -c 'vsftpd' --raw | audit2allow -M my-vsftpd
- 293 # semodule -X 300 -i my-vsftpd.pp
- 294 ausearch -c 'vsftpd' --raw | audit2allow -M my-vsftpd
- 295 semodule -X 300 -i my-vsftpd.pp
- 296 runcon -u system_u -r system_r -t httpd_t vsftpd
- 297 ls startrot*
- 298 vim startrot.te
- 299 ./startrot.sh
- 300 semodule -l | grep start
- 301 seinfo -t | grep start
- 302 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement