Git Product home page Git Product logo

Comments (2)

bolshoytoster avatar bolshoytoster commented on July 17, 2024

The aws environment variables are as follows:

AWS_ACCESS_KEY_ID <--
AWS_CA_BUNDLE
AWS_CLI_AUTO_PROMPT
AWS_CLI_FILE_ENCODING
AWS_CONFIG_FILE <--
AWS_DEFAULT_OUTPUT
AWS_DEFAULT_REGION
AWS_EC2_METADATA_DISABLED
AWS_MAX_ATTEMPTS
AWS_PAGER
AWS_PROFILE <--
AWS_REGION
AWS_RETRY_MODE
AWS_ROLE_ARN
AWS_ROLE_SESSION_NAME
AWS_SECRET_ACCESS_KEY <-- 
AWS_SESSION_TOKEN <--
AWS_SHARED_CREDENTIALS_FILE <--
AWS_STS_REGIONAL_ENDPOINTS
AWS_WEB_IDENTITY_TOKEN_FILE <--

Most of these are pretty useless to an attacker, apart from the ones marked with arrows.

Another thing to note: these are only useful against aws servers, these likely won't be defined on anything else. For other servers you could still use some common environment variables to learn more about the server:

Windows:

ALLUSERSPROFILE
APPDATA
CommonProgramFiles
CommonProgramFiles(x86)
CommonProgramW6432
COMPUTERNAME
ComSpec
HOMEDRIVE
HOMEPATH
LOCALAPPDATA
LOGONSERVER
PATH <--
PATHEXT <--
ProgramData
ProgramFiles
ProgramFiles(x86)
ProgramW6432
PROMPT
PSModulePath
PUBLIC
SystemDrive
SystemRoot
TEMP
TMP
USERDOMAIN
USERNAME
USERPROFILE
windir

The only two I can see being useful are PATH and PATHEXT, they could give you an idea as to what software is installed/running.

Linux (ubuntu, the most popular distro for servers):

SHELL
SESSION_MANAGER
QT_ACCESSIBILITY
COLORTERM
XDG_CONFIG_DIRS
XDG_MENU_PREFIX
GNOME_DESKTOP_SESSION_ID
LANGUAGE
GNOME_SHELL_SESSION_MODE
SSH_AUTH_SOCK
DESKTOP_SESSION
SSH_AGENT_PID
GTK_MODULES
PWD
LOGNAME
XDG_SESSION_DESKTOP
XDG_SESSION_TYPE
GPG_AGENT_INFO
XAUTHORITY
WINDOWPATH
HOME
USERNAME
IM_CONFIG_PHASE
LANG
LS_COLORS
XDG_CURRENT_DESKTOP
VTE_VERSION
GNOME_TERMINAL_SCREEN
INVOCATION_ID
MANAGERPID
LESSCLOSE
XDG_SESSION_CLASS
TERM
LESSOPEN
USER
GNOME_TERMINAL_SERVICE
DISPLAY
SHLVL
XDG_RUNTIME_DIR
JOURNAL_STREAM
XDG_DATA_DIRS
PATH
GDMSESSION
DBUS_SESSION_BUS_ADDRESS
_
OLDPWD

Linux environment variables are a lot more useful; pretty much all of them can be used to tell what software is installed/running and what versions they are running at.

MacOS:
Nobody runs a server on mac.

These other environment variables aren't very useful on their own but you can use them to find other vulnerable software running on the server, potentially leading to another exploit.

I can submit a pr to add these to the repo if they're useful.

from log4shell.

pbeij avatar pbeij commented on July 17, 2024

Thanks for the information, There were no other pull or issue request regarding this issue.
I will close this issue for now, if you have any more information or questions please let me know.

from log4shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.