Jeffrey Snover and the Making of PowerShell
https://corecursive.com/building-powershell-with-jeffrey-snover/ [corecursive.com]
2024-07-04 23:31
tags:
admin
development
sh
swtools
windows
What if you had to fight against your company’s culture to bring a revolutionary tool to life? Meet Jeffrey Snover, the Microsoft architect behind PowerShell, a command tool that transformed Windows system administration. Initially met with skepticism, Snover’s idea faced resistance from a company that favored graphical interfaces.
source: HN
acme.sh runs arbitrary commands from a remote server
https://github.com/acmesh-official/acme.sh/issues/4659 [github.com]
2023-06-09 04:49
tags:
programming
security
sh
turtles
web
Now it became immediately obvious to my why HiCA only supports acme.sh. They are not conforming to ACME at all! (Bugs the heck outa me that they’re using the official ACME logo on their site even though they don’t implement the ACME standard.)
Instead, HiCA is stealthily crafting curl commands and piping the output to bash. acme.sh is (being tricked into?) running arbitrary code from a remote server.
source: HN
That simple script is still someone's bad day
http://rachelbythebay.com/w/2022/04/05/pipe/ [rachelbythebay.com]
2022-04-19 03:58
tags:
sh
unix
What’s this? The second part of the pipeline still ran? Of course it did. It’s *already running* at the point that the reader fails. Its stdin is hooked to the stdout of the other thing, Unix-centipede style.
How to make Bash fail badly on Ubuntu 16.04 by typo'ing a command name
https://utcc.utoronto.ca/~cks/space/blog/linux/BashNotFoundHang [utcc.utoronto.ca]
2021-01-14 06:29
tags:
admin
linux
sh
turtles
The simple thing to say about this is that it only happens on Ubuntu 16.04, not on 18.04 or 20.04, and it happens because Ubuntu’s normal /etc/bash.bashrc defines a command_not_found_handle function that winds up running a helper program to produce this ‘did you mean’ report. The helper program comes from the command-not-found package, which is installed because it’s Recommended by ubuntu-standard.
Never Run ‘python’ In Your Downloads Folder
https://glyph.twistedmatrix.com/2020/08/never-run-python-in-your-downloads-folder.html [glyph.twistedmatrix.com]
2020-08-24 16:29
tags:
admin
python
security
sh
turtles
Python can execute code. Make sure it executes only the code you want it to.
Not exclusive to python either.
source: L
Hacking With Environment Variables
https://www.elttam.com/blog/env/ [www.elttam.com]
2020-07-15 01:16
tags:
exploit
python
security
sh
turtles
unix
Interesting environment variables to supply to scripting language interpreters
source: HN
Blaming the operating system for allowing people to create files with unusual characters in their names
https://devblogs.microsoft.com/oldnewthing/20200617-00/?p=103870 [devblogs.microsoft.com]
2020-06-18 01:09
tags:
fs
security
sh
windows
What we have here is a case of creating an insecure system and then being surprised that the system is insecure.
This is all too common, but the fix is equally shortsighted. Always too much focus on narrow aspect of the problem.
They claimed that the issue could be fixed by simply adding the ampersand to the list of illegal file name characters. They forgot about the percent sign (for injecting environment variables), the caret (for escaping), and possibly even the apostrophe.
CVE-2020-8816 – Pi-hole Remote Code Execution
https://natedotred.wordpress.com/2020/03/28/cve-2020-8816-pi-hole-remote-code-execution/ [natedotred.wordpress.com]
2020-05-28 17:33
tags:
exploit
php
sh
web
Pi-hole is affected by a Remote Code Execution vulnerability. An authenticated user of the Web portal can execute arbitrary command with the underlying server with the privileges of the local user executing the service. Exploitation of this vulnerability can be automated.
Neat trick to get around input restrictions:
Luckily for us, the PATH contains the strings “pihole” and “usr” which in turn contains the “p”, “h” and “r” lower-case characters. Those are the only letters we need to write “php -r”.
source: HN
Clear Your Terminal in Style
https://adammusciano.com/2020/03/04/2020-03-04-clear-your-terminal-in-style/ [adammusciano.com]
2020-03-05 20:00
tags:
admin
sh
tty
If you’re someone like me who habitually clears their terminal, sometimes you want a little excitement in your life. Here is a way to do just that.
source: HN
murex
https://murex.rocks/ [murex.rocks]
2020-01-15 20:12
tags:
release
sh
murex is a shell, like bash / zsh / fish / etc. It follows a similar syntax to POSIX shells like Bash however supports more advanced features than you’d typically expect from a $SHELL.
It aims to be similar enough to traditional shells that you can retain most of your muscle memory, while not being afraid to make breaking changes where “bash-isms” lead to unreadable, hard to maintain, or unsafe code.
https://github.com/lmorg/murex
source: HN
gter - a terminal for GUI apps
https://github.com/raoofha/gter [github.com]
2020-01-14 22:02
tags:
sh
swtools
ux
x11
A shell may be more accurate?
source: HN
Your Makefiles are wrong
https://tech.davis-hansson.com/p/make/ [tech.davis-hansson.com]
2019-12-17 23:29
tags:
development
sh
swtools
Your Makefiles are full of tabs and errors. An opinionated approach to writing (GNU) Makefiles that I learned from Ben may still be able to salvage them.
I don’t agree with everything, or even most of this, but worth considering.
source: HN
Miller
http://johnkerl.org/miller/doc/index.html [johnkerl.org]
2019-12-14 20:58
tags:
sh
swtools
unix
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON. You get to work with your data using named fields, without needing to count positional column indices.
This is something the Unix toolkit always could have done, and arguably always should have done. It operates on key-value-pair data while the familiar Unix tools operate on integer-indexed fields: if the natural data structure for the latter is the array, then Miller’s natural data structure is the insertion-ordered hash map. This encompasses a variety of data formats, including but not limited to the familiar CSV, TSV, and JSON. (Miller can handle positionally-indexed data as a special case.)
https://github.com/johnkerl/miller
Git submodule update command execution
https://gitlab.com/gitlab-com/gl-security/disclosures/blob/master/003_git_submodule/advisory.md#git-submodule-update-command-execution [gitlab.com]
2019-12-11 02:30
tags:
exploit
git
security
sh
swtools
The git submodule update operation can lead to execution of arbitrary shell commands defined in the .gitmodules file.
source: grugq
snek - Python from PowerShell
https://github.com/adamdriscoll/snek [github.com]
2019-11-16 03:47
tags:
python
sh
windows
From https://ironmansoftware.com/snek-integrating-python-in-powershell/
Snek is a cross-platform PowerShell module for integrating with Python. It uses the Python for .NET library to load the Python runtime directly into PowerShell. Using the dynamic language runtime, it can then invoke Python scripts and modules and return the result directly to PowerShell as managed .NET objects.
source: R
kill tail(1) when sh exits
https://dacav.roundhousecode.com/blog/2019-10/17-kill-tail-1-when-sh-exits.html [dacav.roundhousecode.com]
2019-10-17 17:24
tags:
admin
intro-programming
sh
As a solution, the POSIX shell provides a built-in named trap, documented here. In short it allows to define actions to be executed upon signaling, and that includes shell termination. It is similar to atexit(3) in POSIX C.
source: L
pure sh bible
https://github.com/dylanaraps/pure-sh-bible [github.com]
2019-09-28 17:28
tags:
programming
reference
sh
A collection of pure POSIX sh alternatives to external processes.
Batch renaming images, including image resolution, with awk
https://victoria.dev/verbose/batch-renaming-images-including-image-resolution-with-awk/ [victoria.dev]
2019-09-06 12:20
tags:
programming
sh
swtools
I previously wrote about the power of command line tools like sed. This post expands on how to string all this magical functionality into one big, long, rainbow-coloured, viscous stream of awesome.
Introducing nushell
http://www.jonathanturner.org/2019/08/introducing-nushell.html [www.jonathanturner.org]
2019-08-24 18:14
tags:
beta
rust
sh
swtools
Today, we’re introducing a new shell, written in Rust. It draws inspiration from the classic Unix philosophy of pipelines, the structured data approach of PowerShell, functional programming, systems programming, and more.
source: L
xargs wtf
https://medium.com/@aarontharris/xargs-wtf-34d2618286b7 [medium.com]
2019-08-04 17:00
tags:
sh
swtools
unix
A one liner to rename files.
ls | grep ‘aaa’ | sed ‘p;s/aaa/bbb/’ | xargs -n2 | xargs -L1 bash -c ‘mv $0 $1’
source: Dfly