# FreeBSD

find freebsd version:

`uname -a`

view installed software:

`pkg_info` or `pkg info`

view passwords:

`vipw` or `cat /etc/master.passwd`

View listening ports:

`netstat -an -p tcp`

view services:

`ps aux`

Shows operating system info

`uname -a`

search files for password:

`grep -ri 'password' *`

cracking passwords

```
sudo john master.passwd --wordlist=pass 
Using default input encoding: UTF-8
Loaded 1 password hash (sha512crypt, crypt(3) $6$ [SHA512 256/256 AVX2 4x])
Cost 1 (iteration count) is 5000 for all loaded hashes
Press 'q' or Ctrl-C to abort, almost any other key for status
password          (iron)
1g 0:00:00:00 DONE (2020-10-02 11:35) 25.00g/s 100.0p/s 100.0c/s 100.0C/s iron..577
Use the "--show" option to display all of the cracked passwords reliably
Session completed

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/privilege-esclation/freebsd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
