Linux Environment Variables
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
Global variables
Vigezo vya kimataifa vitakuwa vinarithiwa na mchakato wa watoto.
Unaweza kuunda kigezo cha kimataifa kwa ajili ya kikao chako cha sasa kwa kufanya:
Hii variable itapatikana na vikao vyako vya sasa na michakato yake ya watoto.
Unaweza kuondoa variable kwa kufanya:
Local variables
Mabadiliko ya local yanaweza tu kupatikana na shell/script ya sasa.
Orodha ya mabadiliko ya sasa
Common variables
From: https://geek-university.com/linux/common-environment-variables/
DISPLAY – onyesho linalotumiwa na X. Kigezo hiki kawaida huwekwa kuwa :0.0, ambayo inamaanisha onyesho la kwanza kwenye kompyuta ya sasa.
EDITOR – mhariri wa maandiko anayependelea mtumiaji.
HISTFILESIZE – idadi ya juu ya mistari iliyomo katika faili ya historia.
HISTSIZE – Idadi ya mistari iliyoongezwa kwenye faili ya historia wakati mtumiaji anamaliza kikao chake.
HOME – saraka yako ya nyumbani.
HOSTNAME – jina la mwenyeji wa kompyuta.
LANG – lugha yako ya sasa.
MAIL – mahali ambapo mchanganyiko wa barua wa mtumiaji upo. Kawaida ni /var/spool/mail/USER.
MANPATH – orodha ya saraka za kutafuta kurasa za mwongozo.
OSTYPE – aina ya mfumo wa uendeshaji.
PS1 – kiashiria cha chaguo-msingi katika bash.
PATH – huhifadhi njia ya saraka zote ambazo zina faili za binary unazotaka kutekeleza kwa kutaja tu jina la faili na si kwa njia ya uhusiano au ya moja kwa moja.
PWD – saraka ya kazi ya sasa.
SHELL – njia ya shell ya amri ya sasa (kwa mfano, /bin/bash).
TERM – aina ya terminal ya sasa (kwa mfano, xterm).
TZ – eneo lako la muda.
USER – jina lako la mtumiaji la sasa.
Interesting variables for hacking
HISTFILESIZE
Badilisha thamani ya kigezo hiki kuwa 0, ili wakati unapo maliza kikao chako faili ya historia (~/.bash_history) itafutwa.
HISTSIZE
Badilisha thamani ya hii variable kuwa 0, ili wakati unapo maliza kikao chako amri yoyote itaongezwa kwenye faili ya historia (~/.bash_history).
http_proxy & https_proxy
Mchakato utatumia proxy iliyotangazwa hapa kuungana na mtandao kupitia http au https.
SSL_CERT_FILE & SSL_CERT_DIR
Mifumo itatumia vyeti vilivyoonyeshwa katika hizi env variables.
PS1
Badilisha jinsi inavyoonekana kwa kiashiria chako.
Mizizi:
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-f59a9496649acdaa713f751a392f7efa089167a5%252Fimage%2520%28897%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=b4454a1d&sv=1)
Mtumiaji wa kawaida:
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-7f0f2643d15b502c7ef843119e6796130b65816d%252Fimage%2520%28740%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=d3579dcc&sv=1)
Kazi tatu zilizopangwa nyuma:
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-189c54defb3d76406b64a23069a1d2d8fa6704e9%252Fimage%2520%28145%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=45f52224&sv=1)
Kazi moja iliyopangwa nyuma, moja iliyo simamishwa na amri ya mwisho haikukamilika vizuri:
![](https://book.hacktricks.xyz/~gitbook/image?url=https%3A%2F%2F3018635170-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FCtGnfY5n0YCGcWtBkgwe%252Fuploads%252Fgit-blob-c31211c7574f297aa27222d57c899b49c5c3f926%252Fimage%2520%28715%29.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=9d521db2&sv=1)
Jifunze & fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze & fanya mazoezi ya GCP Hacking:
HackTricks Training GCP Red Team Expert (GRTE)
Last updated