{{#include ../../banners/hacktricks-training.md}} # Check for possible actions inside the GUI application **Common Dialogs** are those options of **saving a file**, **opening a file**, selecting a font, a color... Most of them will **offer a full Explorer functionality**. This means that you will be able to access Explorer functionalities if you can access these options: - Close/Close as - Open/Open with - Print - Export/Import - Search - Scan You should check if you can: - Modify or create new files - Create symbolic links - Get access to restricted areas - Execute other apps ## Command Execution Maybe **using a `Open with`** option\*\* you can open/execute some kind of shell. ### Windows For example _cmd.exe, command.com, Powershell/Powershell ISE, mmc.exe, at.exe, taskschd.msc..._ find more binaries that can be used to execute commands (and perform unexpected actions) here: [https://lolbas-project.github.io/](https://lolbas-project.github.io) ### \*NIX \_\_ _bash, sh, zsh..._ More here: [https://gtfobins.github.io/](https://gtfobins.github.io) # Windows ## Bypassing path restrictions - **Environment variables**: There are a lot of environment variables that are pointing to some path - **Other protocols**: _about:, data:, ftp:, file:, mailto:, news:, res:, telnet:, view-source:_ - **Symbolic links** - **Shortcuts**: CTRL+N (open new session), CTRL+R (Execute Commands), CTRL+SHIFT+ESC (Task Manager), Windows+E (open explorer), CTRL-B, CTRL-I (Favourites), CTRL-H (History), CTRL-L, CTRL-O (File/Open Dialog), CTRL-P (Print Dialog), CTRL-S (Save As) - Hidden Administrative menu: CTRL-ALT-F8, CTRL-ESC-F9 - **Shell URIs**: _shell:Administrative Tools, shell:DocumentsLibrary, shell:Librariesshell:UserProfiles, shell:Personal, shell:SearchHomeFolder, shell:Systemshell:NetworkPlacesFolder, shell:SendTo, shell:UsersProfiles, shell:Common Administrative Tools, shell:MyComputerFolder, shell:InternetFolder_ - **UNC paths**: Paths to connect to shared folders. You should try to connect to the C$ of the local machine ("\\\127.0.0.1\c$\Windows\System32") - **More UNC paths:** | UNC | UNC | UNC | | ------------------------- | -------------- | -------------------- | | %ALLUSERSPROFILE% | %APPDATA% | %CommonProgramFiles% | | %COMMONPROGRAMFILES(x86)% | %COMPUTERNAME% | %COMSPEC% | | %HOMEDRIVE% | %HOMEPATH% | %LOCALAPPDATA% | | %LOGONSERVER% | %PATH% | %PATHEXT% | | %ProgramData% | %ProgramFiles% | %ProgramFiles(x86)% | | %PROMPT% | %PSModulePath% | %Public% | | %SYSTEMDRIVE% | %SYSTEMROOT% | %TEMP% | | %TMP% | %USERDOMAIN% | %USERNAME% | | %USERPROFILE% | %WINDIR% | | ## Download Your Binaries Console: [https://sourceforge.net/projects/console/](https://sourceforge.net/projects/console/)\ Explorer: [https://sourceforge.net/projects/explorerplus/files/Explorer%2B%2B/](https://sourceforge.net/projects/explorerplus/files/Explorer%2B%2B/)\ Registry editor: [https://sourceforge.net/projects/uberregedit/](https://sourceforge.net/projects/uberregedit/) ## Accessing filesystem from the browser | PATH | PATH | PATH | PATH | | ------------------- | ----------------- | ------------------ | ------------------- | | File:/C:/windows | File:/C:/windows/ | File:/C:/windows\\ | File:/C:\windows | | File:/C:\windows\\ | File:/C:\windows/ | File://C:/windows | File://C:/windows/ | | File://C:/windows\\ | File://C:\windows | File://C:\windows/ | File://C:\windows\\ | | C:/windows | C:/windows/ | C:/windows\\ | C:\windows | | C:\windows\\ | C:\windows/ | %WINDIR% | %TMP% | | %TEMP% | %SYSTEMDRIVE% | %SYSTEMROOT% | %APPDATA% | | %HOMEDRIVE% | %HOMESHARE | |