Error when entering backticks on AWS EC2 instance in shell
Backticks make the text go all over the place
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Application Security | Secure Code | AWS Security | EC2
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering backticks on the command line in a bash shell on an AWS EC2 instance leads to all kinds of wonky behavior. Is it the backticks? Or because I have multiple tabs open? Or…??? Here’s what happens.
I was trying to do something like the query in the commands in this story.
I had all kinds of strange behavior trying to run that scirpt.
Now I’m trying to run a separate query usign that same functionality but for AWS Organizational Units.
What happens when I enter the backticks is that the cursor jumps to the line above where it should be.
I start by copying and pasting this line into the command shell:
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*RpwgOKCqT1u6BTIqeo0VMA.png)
I change the name of the command — so far so good.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*6FiR1b7HMLuPF50K3c1nWA.png)
I add a space and two dashes so I can add the parent-id parameter and I get this:
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*elt7rBVId1W-XJhUnDaGpQ.png)
UGH. What is that? There’s no way for me to edit this now.
If I hit enter and hit the up arrow to get the last line I typed…
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*iXpRBOHT9NYMlso7CS4bOg.png)
That is not what I typed.
If I try to backspace the whole line disappears. The cursor jumps up a line which is not right at all. It should never go back a line.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*O_r2qtpXkrmZJj2o3wt8WQ.png)
If I hit enter, it appears to execute something I can’t see. Thankfully it was an invalid command since I have no idea what just ran.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*1Rtdpx1pQHWwXLxZA1ngJA.png)
I type clear and then the up arrow. I get something somewhat promising. Maybe I can work with this.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*HdwUQn_03ouhLSp0cNOj1g.png)
As I’m typing “OrganizationalUnits” my cursor randomly jumps to the right and now I have duplicate text.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*pV3ejd59MFkm7JoTTJWKCQ.png)
So, this is a pointless exercise. I can try to write it in a script instead. Sometimes when I logout and log back in it works.
But whatever is going on here is 100% a bug.
Well, I just tried this on my local Mac and the same thing happens there. So perhaps there’s something bigger than AWS going on here. But it doesn’t look good, whatever it is. I really don’t have time to dig into this. Behind on a pentest…
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2023
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png)