Kotsi ea tlhophiso ea Nginx ka litlhophiso tse fosahetseng tsa alias block

Li-server tse ling tse nang le nginx li lula li le kotsing ea mokhoa oa Nginx Alias ​​​​Traversal, o neng o khothalelitsoe kopanong ea Blackhat morao koana ka selemo sa 2018 mme o lumella phihlello ea lifaele le li-directory tse fumanehang kantle ho buka ea motso e boletsoeng ho taelo ea "alias". Bothata bo hlaha feela ka tlhophiso ka taelo ea "alias" e behiloeng ka har'a "sebaka" block, parameter ea eona e sa felle ka sebopeho sa "/", ha "alias" e qetella ka "/".

Kotsi ea tlhophiso ea Nginx ka litlhophiso tse fosahetseng tsa alias block

Motso oa bothata ke hore lifaele tsa li-block tse nang le taelo ea alias li fanoa ka ho hokela tsela e kopiloeng, ka mor'a ho e bapisa le maske ho tsoa ho tataiso ea sebaka le ho khaola karolo ea tsela e boletsoeng ho mask ona. Bakeng sa mohlala oa tlhophiso e kotsing e bontšitsoeng ka holimo, mohlaseli a ka kopa faele "/img../test.txt" 'me kopo ena e tla lumellana le maske a boletsoeng sebakeng "/img", ka mor'a moo mohatla o setseng "../ test.txt" e tla hokelloa tseleng e tsoang ho alias directive "/var/images/" 'me ka lebaka leo faele "/var/images/../test.txt" e tla kopuoa. Ka hona, bahlaseli ba ka fumana lifaele leha e le life ho "/ var" directory, eseng feela lifaele tse "/var/images/", mohlala, ho khoasolla log ea nginx, u ka romela kopo "/img../log/ nginx/ access.log".

Litlhophisong tseo boleng ba taelo ea alias bo sa felle ka "/" sebopeho (mohlala, "alias / var / litšoantšo;"), mohlaseli a ke ke a fetohela bukeng ea motsoali, empa a ka kopa buka e 'ngoe ho / var. eo lebitso la hae le qalang ka ho hlalositsoe ho setlhophiso. Ka mohlala, ka ho kopa "/img.old/test.txt" u ka fumana lenane la "var/images.old/test.txt".

Tlhahlobo ea li-repositories ho GitHub e bontšitse hore liphoso tsa tlhophiso ea nginx tse lebisang bothateng li ntse li fumanoa mererong ea sebele. Ka mohlala, boteng ba bothata bo ile ba fumanoa karolong e ka morao ea mookameli oa password ea Bitwarden 'me e ka sebelisoa ho fumana lifaele tsohle tse ka har'a / joalo-joalo / bitwarden directory (likōpo tsa / li-attachments li fanoe ho tloha / joalo-joalo / bitwarden / li-attachments /), ho kenyeletsoa le database e bolokiloeng moo e nang le li-passwords "vault. db", setifikeiti le lintlha, tseo ho neng ho lekane ho romela likopo "/attachments../vault.db", "/attachments../identity.pfx", "/attachments ../logs/api.log", joalo-joalo .P.

Kotsi ea tlhophiso ea Nginx ka litlhophiso tse fosahetseng tsa alias block
Kotsi ea tlhophiso ea Nginx ka litlhophiso tse fosahetseng tsa alias block

Mokhoa ona o boetse oa sebetsa le Google HPC Toolkit, moo likopo tsa /static li ileng tsa fetisetsoa ho "../hpc-toolkit/community/front-end/website/static/" directory. Ho fumana database e nang le senotlolo sa poraefete le lintlha, mohlaseli a ka romella lipotso "/static../.secret_key" le "/static../db.sqlite3".

Kotsi ea tlhophiso ea Nginx ka litlhophiso tse fosahetseng tsa alias block


Source: opennet.ru

Eketsa ka tlhaloso