Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10b0b68c57 | ||
|
|
29c2e71ea0 | ||
|
|
278e2af172 | ||
|
|
a4ec496cc1 | ||
|
|
38d87cd90a | ||
|
|
92552c0eb8 | ||
|
|
1767b25d3c | ||
|
|
766bbb8fa8 | ||
|
|
80c42066a0 | ||
|
|
a4227a7758 |
@@ -1,6 +1,6 @@
|
||||
# Example Dojo
|
||||
|
||||
This repositories features an example dojo.
|
||||
This repository features an example dojo.
|
||||
|
||||
The dojo is defined by [dojo.yml](./dojo.yml).
|
||||
|
||||
@@ -84,7 +84,7 @@ When `/bin/sh` (which is linked to `/bin/dash`) is run under this, it will immed
|
||||
This means that both the **effective** and **real** user will be `hacker`, and the flag will not be accessible.
|
||||
This affects `system`, which ultimately just runs `/bin/sh`.
|
||||
|
||||
The challenge can rememedy this by explicitly setting the **real** user to the **effective** user:
|
||||
The challenge can remedy this by explicitly setting the **real** user to the **effective** user:
|
||||
```c
|
||||
setreuid(geteuid(), -1)
|
||||
```
|
||||
|
||||
@@ -10,10 +10,19 @@ xfce_env() {
|
||||
}
|
||||
|
||||
xfce_run() {
|
||||
setsid su "$USER" -c "env - $(xfce_env) $*"
|
||||
id
|
||||
which su
|
||||
echo "$USER"
|
||||
setsid runuser "$USER" -c "env - $(xfce_env) $*"
|
||||
}
|
||||
|
||||
# Launch a background process that waits for xfce4-session and then runs the command.
|
||||
(
|
||||
while ! pgrep -u "$USER" xfce4-session > /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Consider using `--geometry` to set the window size and position
|
||||
# Consider using `--fullscreen` to launch the application in fullscreen mode
|
||||
|
||||
xfce_run exo-open --launch TerminalEmulator
|
||||
) &
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
This challenge demonstrates how to automatically launch a desktop application after the desktop starts.
|
||||
@@ -0,0 +1 @@
|
||||
This module showcases two styles of embedded lectures that pwn.college supports: graded and non-graded.
|
||||
@@ -0,0 +1 @@
|
||||
hh4XAU6XYP0 549
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Lectures
|
||||
resources:
|
||||
- name: Ungraded Lecture
|
||||
type: lecture
|
||||
video: hh4XAU6XYP0
|
||||
slides: 14ZJRIyf0HnoYO1N8GI5ygE-ZVgdhjJrvzkETFLz7NIo
|
||||
- id: graded-lecture
|
||||
type: challenge
|
||||
name: Graded Lecture
|
||||
description: |
|
||||
Lectures can be graded by embedding them as challenges!
|
||||
This is a demonstration of this capability.
|
||||
|
||||
Graded lectures are actually custom challenges with a custom interface.
|
||||
The challenge runs a special docker container, and the way to configure it is to include a .config file containing the youtube ID for the video and the duration in seconds that must be watched before the flag is given.
|
||||
image: pwncollege/challenge-lecture
|
||||
interfaces:
|
||||
- name: Challenge
|
||||
port: 80
|
||||
Reference in New Issue
Block a user