From 3f0d76b72dcf5ec289612e1af812a79b030957de Mon Sep 17 00:00:00 2001 From: chest Date: Mon, 17 Feb 2025 22:11:59 +0300 Subject: [PATCH] feat: Linux admin --- .gitignore | 1 + .obsidian/app.json | 1 + .obsidian/appearance.json | 1 + .obsidian/core-plugins.json | 31 ++++++ .obsidian/graph.json | 22 ++++ .obsidian/workspace.json | 209 ++++++++++++++++++++++++++++++++++++ Linux Terminal.md | 14 +++ Welcome.md | 5 + Абузы.md | 23 ++++ 9 files changed, 307 insertions(+) create mode 100644 .gitignore create mode 100644 .obsidian/app.json create mode 100644 .obsidian/appearance.json create mode 100644 .obsidian/core-plugins.json create mode 100644 .obsidian/graph.json create mode 100644 .obsidian/workspace.json create mode 100644 Linux Terminal.md create mode 100644 Welcome.md create mode 100644 Абузы.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dc6a234 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.trash diff --git a/.obsidian/app.json b/.obsidian/app.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.obsidian/app.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/.obsidian/appearance.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json new file mode 100644 index 0000000..b977c25 --- /dev/null +++ b/.obsidian/core-plugins.json @@ -0,0 +1,31 @@ +{ + "file-explorer": true, + "global-search": true, + "switcher": true, + "graph": true, + "backlink": true, + "canvas": true, + "outgoing-link": true, + "tag-pane": true, + "properties": false, + "page-preview": true, + "daily-notes": true, + "templates": true, + "note-composer": true, + "command-palette": true, + "slash-command": false, + "editor-status": true, + "bookmarks": true, + "markdown-importer": false, + "zk-prefixer": false, + "random-note": false, + "outline": true, + "word-count": true, + "slides": false, + "audio-recorder": false, + "workspaces": false, + "file-recovery": true, + "publish": false, + "sync": true, + "webviewer": false +} \ No newline at end of file diff --git a/.obsidian/graph.json b/.obsidian/graph.json new file mode 100644 index 0000000..42a46ec --- /dev/null +++ b/.obsidian/graph.json @@ -0,0 +1,22 @@ +{ + "collapse-filter": true, + "search": "", + "showTags": false, + "showAttachments": false, + "hideUnresolved": false, + "showOrphans": true, + "collapse-color-groups": true, + "colorGroups": [], + "collapse-display": true, + "showArrow": false, + "textFadeMultiplier": 0, + "nodeSizeMultiplier": 1, + "lineSizeMultiplier": 1, + "collapse-forces": true, + "centerStrength": 0.518713248970312, + "repelStrength": 10, + "linkStrength": 1, + "linkDistance": 250, + "scale": 1, + "close": true +} \ No newline at end of file diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json new file mode 100644 index 0000000..7eb9f4c --- /dev/null +++ b/.obsidian/workspace.json @@ -0,0 +1,209 @@ +{ + "main": { + "id": "2205933f3246e05d", + "type": "split", + "children": [ + { + "id": "ff6f1a4692ccf839", + "type": "tabs", + "dimension": 99.99999999999999, + "children": [ + { + "id": "76682f9a45ee5aba", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Welcome.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "Welcome" + } + }, + { + "id": "c524fb5de6d114e8", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Linux Terminal.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "Linux Terminal" + } + }, + { + "id": "3fbdec32d8680636", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Welcome.md", + "mode": "source", + "source": false + }, + "icon": "lucide-file", + "title": "Welcome" + } + } + ], + "currentTab": 2 + } + ], + "direction": "vertical" + }, + "left": { + "id": "4a5de1ea80d53a1f", + "type": "split", + "children": [ + { + "id": "a38ca975257314b3", + "type": "tabs", + "children": [ + { + "id": "33c9ba2ec68cd063", + "type": "leaf", + "state": { + "type": "file-explorer", + "state": { + "sortOrder": "alphabetical", + "autoReveal": false + }, + "icon": "lucide-folder-closed", + "title": "Files" + } + }, + { + "id": "1ad918d29d5c3cb4", + "type": "leaf", + "state": { + "type": "search", + "state": { + "query": "", + "matchingCase": false, + "explainSearch": false, + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical" + }, + "icon": "lucide-search", + "title": "Search" + } + }, + { + "id": "04742b38e484393e", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {}, + "icon": "lucide-bookmark", + "title": "Bookmarks" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300 + }, + "right": { + "id": "8f57d2b38fbc4a87", + "type": "split", + "children": [ + { + "id": "af7c12b53ff6693d", + "type": "tabs", + "children": [ + { + "id": "79db4792e945e566", + "type": "leaf", + "state": { + "type": "backlink", + "state": { + "file": "Welcome.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", + "showSearch": false, + "searchQuery": "", + "backlinkCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-coming-in", + "title": "Backlinks for Welcome" + } + }, + { + "id": "d8e2e3a00d26de33", + "type": "leaf", + "state": { + "type": "outgoing-link", + "state": { + "file": "Welcome.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + }, + "icon": "links-going-out", + "title": "Outgoing links from Welcome" + } + }, + { + "id": "cea8328acf62a457", + "type": "leaf", + "state": { + "type": "tag", + "state": { + "sortOrder": "frequency", + "useHierarchy": true, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-tags", + "title": "Tags" + } + }, + { + "id": "2b447fa77f7b61e7", + "type": "leaf", + "state": { + "type": "outline", + "state": { + "file": "Welcome.md", + "followCursor": false, + "showSearch": false, + "searchQuery": "" + }, + "icon": "lucide-list", + "title": "Outline of Welcome" + } + } + ] + } + ], + "direction": "horizontal", + "width": 300, + "collapsed": true + }, + "left-ribbon": { + "hiddenItems": { + "switcher:Open quick switcher": false, + "graph:Open graph view": false, + "canvas:Create new canvas": false, + "daily-notes:Open today's daily note": false, + "templates:Insert template": false, + "command-palette:Open command palette": false + } + }, + "active": "3fbdec32d8680636", + "lastOpenFiles": [ + "Linux Terminal.md", + "Абузы.md", + "Welcome.md", + "Linux Admin", + "create a link.md" + ] +} \ No newline at end of file diff --git a/Linux Terminal.md b/Linux Terminal.md new file mode 100644 index 0000000..8faee62 --- /dev/null +++ b/Linux Terminal.md @@ -0,0 +1,14 @@ +### Данные о себе # +- `whoami` -> кто ты такое +- `pwd` -> отобразит текущую директорию +- `id` -> отобразит твой айдишник +- `ls -la` -> список файлов вокруг (в т.ч. скрытые) + +### Базовые утилиты ### +- `cd /Directory` -> переместиться в другую директорию +- `mv file.txt /Directory` -> переместить файл в директорию +- `cp file.txt /Directory` -> копировать файл в директорию +- `cat file.txt` -> открыть файл +- `cat file.txt | grep -i 'meow'` -> найти все meow игнорируя регистр (-i) в данном файле +- `su [user]` -> переключение на другого пользователя +- `sudo` -> исполнить команду от имени другого пользователя (базово root) \ No newline at end of file diff --git a/Welcome.md b/Welcome.md new file mode 100644 index 0000000..f9bca28 --- /dev/null +++ b/Welcome.md @@ -0,0 +1,5 @@ +This is your new *vault*. + +Make a note of something, [[create a link]], or try [the Importer](https://help.obsidian.md/Plugins/Importer)! + +When you're ready, delete this note and make the vault your own. \ No newline at end of file diff --git a/Абузы.md b/Абузы.md new file mode 100644 index 0000000..e8d9c25 --- /dev/null +++ b/Абузы.md @@ -0,0 +1,23 @@ +### sudo -l ### +`sudo -l` покажет, что можно выполнять от рута +### /home/user/* +Использовать относительные пути с `../`, возвращаясь назад и ходя, куда хош: +Флаг в `/home/user/flag.txt` +Разрешено в `/home/user/user_files/*` +Используем `/home/user/user_files/../flag.txt` + +### SUID + `find / -perm -4000 2>/dev/null + Всё есть на HackTricks + `/home/kali/Desktop/hacktricks/linux-hardening/linux-privilege-escalation-checklist.md` + +### /etc/shadow и /etc/passwd +Смотрим права на них и или меняем хэши или дешифруем хэши + +### hashcat +`hashcat pass_hash.txt /usr/share/wordlists/rockyou.txt + +### Vim +Команды в Vim писать через `:!bin/bash [или любая другая команда]` +Там же редактировать можно +Там же выход `:wq` \ No newline at end of file