At the very end of the article, > Upgrade to iTerm2 3.5.0 I had just gotten the upgrade notification for 3.5.0 a few minutes ago. I scrolled through the release notes a bit and got to the "AI" section and I would like very much to get off this ride. I am grumpy and a terminal should be a terminal. Features of iTerm2 I don't use and don't think belong in a terminal emulator: - tmux integration - shell integration - ss…
Abusing url handling in iTerm2 and Hyper for code execution
31–40 of 58 posts
Re: Abusing url handling in iTerm2 and Hyper for code execution
#32At the very end of the article, > Upgrade to iTerm2 3.5.0 I had just gotten the upgrade notification for 3.5.0 a few minutes ago. I scrolled through the release notes a bit and got to the "AI" section and I would like very much to get off this ride. I am grumpy and a terminal should be a terminal. Features of iTerm2 I don't use and don't think belong in a terminal emulator: - tmux integration - shell integration - ss…
Honestly I never understood the need to replace macOS Terminal. I'm heavy terminal user, that's my most used application by far. But macOS Terminal is absolutely fine for my needs and I never felt the need for any additional features.
Re: Abusing url handling in iTerm2 and Hyper for code execution
#33At the very end of the article, > Upgrade to iTerm2 3.5.0 I had just gotten the upgrade notification for 3.5.0 a few minutes ago. I scrolled through the release notes a bit and got to the "AI" section and I would like very much to get off this ride. I am grumpy and a terminal should be a terminal. Features of iTerm2 I don't use and don't think belong in a terminal emulator: - tmux integration - shell integration - ss…
Re: Abusing url handling in iTerm2 and Hyper for code execution
#34Earlier quoted context omitted.
It is the first one, they need to be printed and clicked.
There is also another escape sequence, OSC 1337, apparently already implemented in iTerm2 [0], which makes iTerm2 open the URL instead of printing it: The hypothetical new control code is different because it does not display a hyperlink; it directly opens the link using the appropriate system URL handler. [0] https://gitlab.com/gnachman/iterm2/-/issues/10994
Re: Abusing url handling in iTerm2 and Hyper for code execution
#35Earlier quoted context omitted.
It sure is a good thing we never run anything in our terminals without fully vetting all output. curl -s -L https://raw.githubusercontent.com/Groxx/rickrollrc/master/roll.sh | bash
I can't believe curl | sh is still the recommended way to install oh-my-zsh
Re: Abusing url handling in iTerm2 and Hyper for code execution
#36I stopped using iTerm2 as soon as I learned it will open arbitrary URLs.
Huh, I just disabled it in Preferences and kept on rolling. This is the other viable option: Settings->Pointer->General and disable cmd-click opens filename/URL.
Re: Abusing url handling in iTerm2 and Hyper for code execution
#37Earlier quoted context omitted.
Getting it out of a repository wouldn't make any more vetting appear as if by magic. And if you're facing an attacker sophisticated enough to send different contents to a browser and to curl, then you're probably not going to find their backdoor in the first place. And it would be stupid of them to depend on that trick, so this becomes an extremely niche case not worth worrying about. And multiply that sophistication…
> Getting it out of a repository wouldn't make any more vetting appear as if by magic. But it makes it way easier to figure out what happened if you do get attacked. With "curl | sh" if a compromised site only sends the attack code randomly and I get unlucky I won't have a copy of the attack code afterwards. If I go to the site to grab a copy I'll probably get a copy without the attack code. With "curl > /tmp/foo.$$;…
Re: Abusing url handling in iTerm2 and Hyper for code execution
#38At the very end of the article, > Upgrade to iTerm2 3.5.0 I had just gotten the upgrade notification for 3.5.0 a few minutes ago. I scrolled through the release notes a bit and got to the "AI" section and I would like very much to get off this ride. I am grumpy and a terminal should be a terminal. Features of iTerm2 I don't use and don't think belong in a terminal emulator: - tmux integration - shell integration - ss…
Re: Abusing url handling in iTerm2 and Hyper for code execution
#39I also assume that this vulnerability is meant for remote apps accessed via SSH or similar, since a compromised app that is executed locally probably have easier exploits (they might just run calculator or whatever directly without going through escape sequences, for example).
Re: Abusing url handling in iTerm2 and Hyper for code execution
#40Earlier quoted context omitted.
It is the first one, they need to be printed and clicked.
There is also another escape sequence, OSC 1337, apparently already implemented in iTerm2 [0], which makes iTerm2 open the URL instead of printing it: The hypothetical new control code is different because it does not display a hyperlink; it directly opens the link using the appropriate system URL handler. [0] https://gitlab.com/gnachman/iterm2/-/issues/10994
It has a massive and rapidly growing attack surface and quite a bit of feature bloat (literally hundreds of "features") - I would not recommend using it over Terminal for anyone security minded.