> For the complete documentation index, see [llms.txt](https://j0luuuu.gitbook.io/ctf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://j0luuuu.gitbook.io/ctf/cyberheroines-ctf-2023/web/grace_hopper.md).

# Grace Hopper

## Description

> Grace Brewster Hopper (née Murray; December 9, 1906 – January 1, 1992) was an American computer scientist, mathematician, and United States Navy rear admiral. One of the first programmers of the Harvard Mark I computer, she was a pioneer of computer programming who invented one of the first linkers. Hopper was the first to devise the theory of machine-independent programming languages, and the FLOW-MATIC programming language she created using this theory was later extended to create COBOL, an early high-level programming language still in use today. - Wikipedia Entry

> Chal: Command this webapp like this Navy Real Admiral

## Challenge URL

[Challenge Link](https://cyberheroines-web-srv2.chals.io/vulnerable.php)

## Solution

* The challenge says to enter a command but `ls` does not work. ![ls](https://1613628666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkuxWaWwvkRd57ql1rtY%2Fuploads%2Fgit-blob-22e5061de5a96e562361845c049ec72a40a11177%2Fimage.png?alt=media)
* Use `dir -a` to list directory contents even hidden files ![dir](https://1613628666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkuxWaWwvkRd57ql1rtY%2Fuploads%2Fgit-blob-46392f09e6efeb791e378b149595b8d57e3a75e3%2Fimage-1.png?alt=media)
* `ls`, `cat`, `more`, `less`, `head`, `tail` commands are blacklisted.
* So to view file contents, we can use `strings` or just `grep` for the flag format to view file contents
* Running `strings` on `cyberheroines.sh` gives us the flag ![flag](https://1613628666-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKkuxWaWwvkRd57ql1rtY%2Fuploads%2Fgit-blob-651fcbad7c28e82706b9fc8781ffa167b67f8013%2Fimage-2.png?alt=media)

### FLAG

```
CHCTF{t#!$_!s_T#3_w@Y}
```
