Commit 8a898ce

bryfry <bryon.fryer@gmail.com>
2017-01-09 10:58:32
add unix
1 parent a7fa6a0
unix/commands/bg.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/chmod.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/chown.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/dig.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/disown.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/dmesg.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/dumpe2fs.md
@@ -0,0 +1,8 @@
+---
+date: "2016-12-21"
+draft: false
+title: "dumpe2fs"
+
+---
+
+
unix/commands/env.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/fg.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/file.md
@@ -0,0 +1,13 @@
+---
+date: "2016-12-21"
+draft: false
+title: "file"
+
+---
+
+Determine file type.
+
+Additional uses include:
+
+* Is this binery file static or dynamically linked?
+* What architecture was this binary file compiled to run on?
unix/commands/getent.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/host.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/insmod.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/jobs.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/lsmod.md
@@ -0,0 +1,16 @@
+---
+date: "2016-12-20"
+draft: false
+title: "lsmod"
+
+---
+ 
+Program to show the status of modules in the Linux Kernel.  
+It is trivial program which nicely formats the contents of the /proc/modules, 
+showing what kernel modules are currently loaded.
+
+# Assorted / Equivilant Mans
+
+* [linux man](https://linux.die.net/man/8/lsmod)
+* BSD equivilant - [kldstat](https://www.freebsd.org/cgi/man.cgi?kldstat(8))
+* Solaris equivilant - [modinfo](https://docs.oracle.com/cd/E23824_01/html/821-1462/modinfo-1m.html)
unix/commands/make.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/modprobe.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/nohup.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/nslookup.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/pmap.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/strace.md
@@ -0,0 +1,14 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
+
+# Assorted / Equivilant Mans
+
+* [strace man](https://linux.die.net/man/1/strace)
+* Solaris equivilant [oracle man](https://docs.oracle.com/cd/E23823_01/html/816-5165/truss-1.html)
+* BSD equivilant - [dtrace](https://wiki.freebsd.org/DTrace)
+* BSD equivilant - [truss](https://www.freebsd.org/cgi/man.cgi?truss)
+* BSD equivilant - [ktrace](https://www.freebsd.org/cgi/man.cgi?ktrace)
unix/commands/sysctl.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/commands/tar.md
@@ -0,0 +1,15 @@
+---
+date: "2016-12-21"
+draft: false
+title: "tar"
+
+---
+
+Create "tape" archive files
+
+| Command                         | Description                                                                         |
+|---------------------------------|-------------------------------------------------------------------------------------|
+| `tar cvf example.tar /etc/`     | Make a backup of the `etc` directory                                                |
+| `tar xvf example.tar`           | Extract an archive                                                                  |
+| `tar cf example.tar -C /etc/ .` | Make a backup of the entire `etc` directory, but don't store files with their paths |
+
unix/commands/truss.md
@@ -0,0 +1,15 @@
+---
+date: "2016-12-20"
+draft: false
+title: "truss"
+
+---
+
+
+# Assorted / Equivilant Mans
+
+* [oracle man](https://docs.oracle.com/cd/E23823_01/html/816-5165/truss-1.html)
+* linux equivilant - [strace](https://linux.die.net/man/1/strace)
+* BSD equivilant - [dtrace](https://wiki.freebsd.org/DTrace)
+* BSD equivilant - [truss](https://www.freebsd.org/cgi/man.cgi?truss)
+* BSD equivilant - [ktrace](https://www.freebsd.org/cgi/man.cgi?ktrace)
unix/commands/uname.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-20"
+draft: false
+title: ""
+
+---
unix/meta/acl.md
@@ -0,0 +1,6 @@
+---
+date: "2016-12-01"
+draft: false
+title: "acl"
+
+---
unix/meta/p
@@ -0,0 +1,1 @@
+/home/ubuntu/git/cnoqcNotes/3_Unix/2_EnumerationAndHardening/2_Logging/
\ No newline at end of file
unix/meta/syscalls.csv
@@ -0,0 +1,18 @@
+# syscalls
+Attempts to open a file, returns a file descriptor: [?](),open,unix_syscalls
+Reads data from a file, returns the number of bytes read: [?](),read,unix_syscalls
+Used to write the output to the terminal, uses a file descriptor: [?](),write,unix_syscalls
+Tells the kernel that the process no longer needs access to the file: [?](),close,unix_syscalls
+Check user's permissions for a file: [?](),access,unix_syscalls
+Looks for status information, such as the access rights, owner, and more: [?](),fstat,unix_syscalls
+Create a new process, which becomes the child process of the caller: [?](),fork,unix_syscalls
+Loads and runs executables: [?](),execve,unix_syscalls
+Send a signal to any process group or process: [?](),kill,unix_syscalls
+C std lib call to allocate memory: [?](),malloc,unix_syscalls
+C std lib call to release memory: [?](),free,unix_syscalls
+Requests a segment of memory for the process to use: [?](),mmap,unix_syscalls
+Map or unmap files or devices into memory: [?](),munmap,unix_syscalls
+Set access protections on a region of memory: [?](),mprotect,unix_syscalls
+Create an endpoint for communication: [?](),socket,unix_syscalls
+Send a message on a socket: [?](),send,unix_syscalls
+Receive a message from a socket: [?](),recv,unix_syscalls
unix/meta/syscalls.md
@@ -0,0 +1,45 @@
+---
+date: "2016-12-01"
+draft: false
+title: "handle"
+
+---
+
+## System Calls
+
+### File Operations
+
+| System Call |                                             Description                                             |
+|-------------|-----------------------------------------------------------------------------------------------------|
+| `open()`    | Attempts to open a file, returns a file descriptor                                                  |
+| `read()`    | Reads data from a file, returns the number of bytes read.                                           |
+| `write()`   | Used to write the output to the terminal, uses a file descriptor                                    |
+| `close()`   | Tells the kernel that the process no longer needs access to the file. Argument is a file descriptor |
+| `access()`  | Check user's permissions for a file                                                                 |
+| `fstat()`   | Looks for status information, such as the access rights, owner, and more                            |
+
+### Process Manipulation
+
+| System Call | Description                                                         |
+|-------------|---------------------------------------------------------------------|
+| `fork()`    | Create a new process, which becomes the child process of the caller |
+| `execve()`  | Loads and runs executables                                          |
+| `kill()`    | Send a signal to any process group or process                       |
+
+### Memory Operations
+
+| System Call  | Description                                         |
+|--------------|-----------------------------------------------------|
+| `malloc()`   | C std lib call to allocate memory                   |
+| `free()`     | C std lib call to release memory                    |
+| `mmap()`     | Requests a segment of memory for the process to use |
+| `munmap()`   | Map or unmap files or devices into memory           |
+| `mprotect()` | Set access protections on a region of memory        |
+
+### Data
+
+| System Call | Description                          |
+|-------------|--------------------------------------|
+| `socket()`  | Create an endpoint for communication |
+| `send()`    | Send a message on a socket           |
+| `recv()`    | Receive a message from a socket      |
unix/meta/unix_types.md
@@ -0,0 +1,34 @@
+
+## Evolution
+
+The most widely deployed UNIX operating systems using the POSIX standards, or
+Single UNIX Specifications, are the SYSV descendants.
+
+### SYSV Descendents
+
+|    OS    |                                  Description                                  |
+|----------|-------------------------------------------------------------------------------|
+| Solaris  | (developed by Sun Microsystems and now owned by Oracle)                       |
+| AIX      | (owned by IBM),                                                               |
+| HP-UX    | (owned by Hewlett Packard).                                                   |
+| MAC OS X | Apple uses the POSIXstandards - though at its core Apple's OS is based on BSD |
+
+### Unix-Like
+
+|    OS   |             Desc            |
+|---------|-----------------------------|
+| Linux   | Developed by Linus Torvalds |
+| FreeBSD | BSD Variant                 |
+| NetBSD  | BSD Variant                 |
+| OpenBSD | BSD Variant                 |
+
+### Trademark
+
+It is also important to note the term UNIX is trademarked by The Open Group. To
+use the UNIX trademark, along with ensuring a product meets the "Single UNIX
+Specification" (the successor of POSIX) - a collection of specification
+documents that are part of the X/Open Common Application Environment (CAE) -
+vendors must pay a licensing fee to brand their products. Those variants that
+use POSIX, or the Single UNIX Specification, but are not licensed by The Open
+Group, are generally considered to be systems that behave like UNIX, but are not
+true UNIX. Again, these variants are commonly referred to as UNIX-like systems.
unix/p
@@ -0,0 +1,1 @@
+/home/ubuntu/git/cnoqcNotes/3_Unix/1_ArchitectureAndDesign
\ No newline at end of file