feat: Linux admin

This commit is contained in:
chest 2025-02-17 22:11:59 +03:00 committed by cheeest
commit 3f0d76b72d
9 changed files with 307 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.trash

1
.obsidian/app.json vendored Normal file
View File

@ -0,0 +1 @@
{}

1
.obsidian/appearance.json vendored Normal file
View File

@ -0,0 +1 @@
{}

31
.obsidian/core-plugins.json vendored Normal file
View File

@ -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
}

22
.obsidian/graph.json vendored Normal file
View File

@ -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
}

209
.obsidian/workspace.json vendored Normal file
View File

@ -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"
]
}

14
Linux Terminal.md Normal file
View File

@ -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)

5
Welcome.md Normal file
View File

@ -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.

23
Абузы.md Normal file
View File

@ -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`