Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >

Questions tagged [bash-scripting]

Bash is a "Unix shell": a command-line interface for interacting with the operating system. It is widely available, being the default shell on many GNU/Linux distributions and on Mac OSX, with ports existing for many other systems. It was intended as a free software alternative to the Bourne shell, and it incorporates all features of that shell, as well as new features such as integer arithmetic and job control.

Filter by
Sorted by
Tagged with
0 votes
2 answers
62 views

Standard scripting utilities such as sed, tr, grep, cat (etc.) can process a stream via standard in and transform it according to some arguments, outputting to STDOUT. I wonder if there are any attack ...
bitmask's user avatar
  • 657
5 votes
3 answers
1k views

If $1 contains untrusted user input for example $(whoami). Are any of the following bash examples vulnerable to command injection? I'm having issues clearly understanding this behavior in Bash. Also, ...
Bob Ortiz's user avatar
  • 7,715
0 votes
0 answers
323 views

i wanna execute ls command inplace of the output being "your name is ls" is there a way to do it ? read -p "name??" name echo "your name is $name"
AverageUser69's user avatar
-1 votes
1 answer
163 views

i have w wordlist of subdomains contains like this : admin.bugbountytarget.com portal.bugbountytarget.com sales.bugbountytarget.com vpn1.bugbountytarget.com dev.test.bugbountytarget.com ... And I ...
Edward Akina's user avatar
1 vote
1 answer
146 views

I asked this at https://apple.stackexchange.com/questions/445343/macapps-link-possible-attack-vector-could-you-pipe-through-some-security-scr but I think this would be more appropriate place. A work ...
HankCa's user avatar
  • 113
0 votes
1 answer
1k views

Since I am new to Linux, when writing scripts I always followed the rule "the less code, the less attack surface", so I try to write scripts with privileged access (sudo, root, etc.) in sh ...
NewLinux's user avatar
  • 735
0 votes
1 answer
290 views

We are currently working on an IoT product & having a hard time coming up with a strategy to create a unique password for each device/unit. I do understand that password based on a function of { ...
Baranikumar Venkatesan's user avatar
0 votes
1 answer
435 views

I ask because I've been looking into Miniconda (https://repo.anaconda.com/miniconda/Miniconda3-py39_4.9.2-Linux-x86_64.sh), and the installation shell script has TONS of binary data starting at line ...
TeknoBen's user avatar
2 votes
2 answers
3k views

I am trying to find if the following shell script is vulnerable to command injection #!/bin/sh set -x dig +noall +answer TXT $2._domainkey.$1 Now when I try something like this, sh script.sh "...
Krishnaraj's user avatar
1 vote
1 answer
399 views

Is Bash more commonly used in security work than PowerShell? If so, why? (Now that Powershell can be used on Linux) I tried to Google around for an answer on this, and the only questions we seem to ...
VSO's user avatar
  • 523
1 vote
1 answer
548 views

On linux ami the only way to easily run systemctl for my server is by running sudo systemctl start node In the service: /etc/systemd/system/node.service sudo seems to be mandatory for the 'enable',...
user1709076's user avatar
3 votes
0 answers
2k views

It has become common trend to use shell scripts from the web and directly run them: bash <(curl -sL some.random.website.com) I always view the script before running them. However, shell scripts ...
shivams's user avatar
  • 241
0 votes
0 answers
723 views

I was going to post this on a different SE site, but I found that explicitly stating --tlsv1.1 to curl fixed the problem, for now. My question now relates to security. A vendor switched to FTPS (not ...
user208145's user avatar
3 votes
2 answers
751 views

I'm currently developing a web service that takes user input and passes it to a bash script as an argument. I know that without sanitizing this allows for remote command execution. So I want to know ...
limeeattack's user avatar
1 vote
0 answers
147 views

Having trouble choosing between the three, I would of course love to learn all three in the future, but right now I'm curious as to which language would be the most beneficial to me. Also, I'm aware ...
s h a a n's user avatar
  • 325