Posts in Powershell (11 found)
dfir.ch 2 weeks ago

ssh-keyscan.exe for Delivering PowerShell Code

Recently, I came across a Unit 42 threat note about a ClickFix campaign abusing the Finger protocol. . The attackers used the legitimate Windows utility to retrieve commands from a remote server over TCP/79, which were subsequently executed through . That got me thinking about other Windows utilities that can retrieve data from remote systems without relying on the usual HTTP download mechanisms. One candidate was , which is included with the OpenSSH client feature on Windows. Normally, is used to retrieve public host keys from SSH servers, primarily for populating files. However, the utility can also request SSH host certificates, which contain more than just a public key.

0 views
spf13 1 months ago

Zelda on My Conference Badge

As one of the GitHub Stars and a member of the GitHub Creators program, I got a package a few days before GitHub Universe: my conference badge, early, with a little note card tucked in that said hack this . As soon as I saw it I thought — man, this has a game controller on it, and it’s kind of perfect. Hanging from a lanyard around your neck, you can just grab it, hold it up, and play. I wonder if I can get The Legend of Zelda on it. So I backed up the flash, mounted the filesystem, and verified the restore came back clean — the whole badge is recoverable from USB, which is why every experiment below ships as you can delete if you want every byte back. With that safety net I started working out how much of the badge I’d have to give up. This year’s badge is called Badger , and it’s a nice piece of hardware: an RP2350 (dual-core ARM Cortex-M33 running at 230 MHz), a 320×240 IPS panel, 16 MB of QSPI flash with about 9.76 MB free for user apps out of the box, 8 MB of QSPI PSRAM, an accelerometer, Bluetooth Low Energy, and an infrared transceiver. It runs MonaOS 4.0, a custom MicroPython environment with hardware-accelerated graphics primitives ( ), a dual-core software 3D rasterizer ( ), and LED control ( ). The obvious approach is to flash a bare-metal C NES emulator as a image. That takes about twenty minutes, and it works. It also turns the badge into a Nintendo emulator that used to be a badge which ruins the entire point. You lose MonaOS: the BLE contact exchange, the venue IR scavenger hunt, the two-player games, the tilt-controlled 3D Mona launcher. All of it. I didn’t want a dedicated emulator. I wanted Zelda , Super Mario Bros. , and Tetris to be an ordinary app inside MonaOS, sitting at , launching from the carousel, and dropping back to the OS when you tap the HOME pad on the back. Which means running inside MicroPython. And running an NES inside an interpreted language on a microcontroller runs into serious performance issues. I love a challenge like this. An NES needs three things: Standard MicroPython bytecode manages somewhere around 100,000–200,000 interpreted opcodes per second on a Cortex-M33. Full-speed NES needs roughly ten times that. Writing a native C module was an option but not one I was really interested in. Custom dynamic native modules on MicroPython are an ABI and symbol-matching gamble against a vendor firmware image. It just felt too risky and fragile of an option. If it breaks on someone else’s badge, it breaks in a way they can’t fix. So with a healthy amount of curiosity and with Gemini 4 Argon we went to work. The model drafted the inner loops from prompts describing the 6502, PPU, and mapper contracts — instruction decode, sprite evaluation, and bank switching. I set the four-pointer architecture around , , , and , shaped the Viper kernels, and measured every number below on hardware over USB serial. The remaining bugs ( , calls, the frame budget) are the kind you only get from running it. Other pure-Python NES emulators I tried allocate objects on every instruction and ran at less than half a frame per second on the badge in my quick test. So Gemini and I built our own NES emulator from scratch ( , ~1,100 lines): a custom 6502 CPU core, scanline PPU renderer, and Mapper 0 ( ), Mapper 1 ( ), Mapper 2 ( ), and Mapper 3 ( ) bank switcher engineered specifically around RP2350 . The thing that makes this possible is . Regular MicroPython, and even , still dispatches through the object model. Viper doesn’t. It compiles typed Python syntax directly into raw ARM Thumb-2 instructions at import time, and it works on unboxed values: machine-word integers and raw pointers ( , , ). So when you dereference , you get a single 16-bit Thumb-2 or . No heap allocation, no dictionary lookups, no garbage collector pressure. That one decorator closes most of the performance gap. The catch is that Viper comes with some fairly unforgiving constraints. Writing non-trivial emulation in Viper means living with the ARM Architecture Procedure Call Standard: So we packed CPU work RAM, OAM, palette RAM, VRAM, and the cartridge save window into a single contiguous 32 KB ( in the emulator, with PRG ROM banked in separately): The badge has no speaker, so there is no APU, and isn’t emulated — this is a picture-only port. The emulator’s own registers (program counter, accumulator, X, Y, stack pointer, status flags, cycle counters, PPU latches, MMC1 shift registers) all live in a 64-element 32-bit integer array ( ). Four pointers ( , , , ) are enough for the entire 6502 core and PPU to run without spilling. The panel runs in 16-bit RGB565. MonaOS exposes the underlying buffer as . Rather than rendering into an intermediate frame buffer and paying for a full-screen blit, the PPU scanline renderer writes directly into display memory: The NES screen is 256 pixels wide and the badge is 320, so centering it leaves a 32-pixel gutter on each side. Leaving that dark seemed like a waste. The left gutter now carries the mark, a live FPS counter (around 32 FPS in Zelda in this post-optimized build with the sidebar and HUD), and a controller input visualizer. The right gutter has the button mapping and a indicator that lights up whenever battery SRAM hits the disk. Flipping the Badge Upside-Down Turns It into a Handheld When the badge hangs from a lanyard, the 8-channel capacitive controller ( ) sits at the top of the board, above the screen. Genius design. It means you can grab the badge, keep the lanyard around your neck and play it like a gameboy as you rotate it 180° and the touch array lands under your thumbs, which is exactly where a handheld wants it. The only issue is the badge’s orientation is now inverted, so the logical mapping of the D-pad and action buttons is upside-down. The fix is simple: The first build that actually booted Zelda on hardware gave us 72.9 ms per frame: 31.9 ms in the 6502 core and 41.0 ms in the PPU renderer. That is 13.7 FPS, about 22% of real-time NES speed. Ok. This is awesome. We got it working, Zelda on my conference badge. Once running the next goal was to make it playable. Four changes took 49 ms off every frame, a 3.1× speedup, down to 23.7 ms in Zelda (about 42 FPS) and 10.9 ms of work per frame in Tetris : A tight read loop used for timing rather than waiting can skip cycles it needed. That is why the compatibility list below is fourteen titles I actually played rather than a claim of universal NES support — the mapper set and optimization are tuned to those. I’m sure other titles play and I’m sure some don’t. The emulator is open source, so you can try your own ROMs and see what works and since we live in the age of agents, have them help patch it for your favorite NES game. Zelda uses battery-backed RAM at to persist quest data (only when you die or open the save screen), while Metroid saves by password; Final Fantasy and Dragon Warrior also rely on battery-backed saves. Most NES classics ( Super Mario Bros. , Tetris , Contra , Castlevania , Mega Man 2 ) have no battery-backed save at all. Because the entire machine state is a 256-byte register array ( ) plus one contiguous ( ), full save states were nearly free to add. They sit next to the battery SRAM image on the badge’s LittleFS partition, as and . One more caveat: the save inherits the write risk — back up anything you care about over USB, or let’s be honest, if you care about it don’t do it on a conference badge. The 60-second auto-save timer is deliberately lazy to be gentle on flash. in the ROM list means a save-state file was found for that title — the list’s marker for “there’s a restore here.” Turn-based RPGs and handheld classics are a natural fit for a lanyard badge you carry between conference sessions. Alongside action staples ( The Legend of Zelda , Super Mario Bros. , Tetris , Contra , Castlevania , Mega Man 2 , Metroid , Donkey Kong Classics , Pac-Man , Galaga , Excitebike , Dr. Mario ), we added full MMC1 + battery SRAM + instant save state profiles for Final Fantasy ( ) and Dragon Warrior ( ). Tetris Mega Man 2 Final Fantasy (NES, MMC1 + save states) Two-Minute Install The NES emulator ( ) and the Hardware Lab ( ) are open source: github.com/spf13/universe-2026-badge-hacks Mount the badge as USB storage. Plug it in over USB-C and launch the USB Disk ( ) app from the MonaOS menu. It shows up as a removable drive ( on Windows, on macOS). Clone and copy : macOS (zsh): Badge not at ? Run to find it — some Macs mount it as or . Windows (PowerShell): Drive letter varies — check File Explorer if doesn’t exist. Add your own ROMs that you’ve dumped yourself and legally obtained. No ROMs are included or linked: Eject & play. Safely eject the drive (macOS: right-click → Eject or ; Windows: system tray → Safely Remove), pick NES from the MonaOS menu, turn the badge upside-down so the capacitive pad sits under your thumbs, and go. Conference badges used to be glorified flashing name tags. Today they’re dual-core ARM computers that compile native machine code at import time, and the interesting part of this project was finding out how far that actually gets you. Today it’s far enough for a playable NES. If you’re heading to GitHub Universe 2026, I look forward to seeing you there. Just remember to save your game before the keynote. (Since it felt like a Game Boy I then wondered if I could get it to run Game Boy Color games too. See the follow-up post: Game Boy Color on My Conference Badge .) An emulated 8-bit Ricoh 2A03 (a 6502 core) at 1.789773 MHz, about 29,780 CPU cycles per frame at 60 Hz. A Picture Processing Unit rasterizing 240 scanlines of background tiles and up to 64 hardware sprites. 61,440 pixels written to the display buffer every frame. Four arguments, maximum. Viper functions take through . A fifth argument is a compile-time error. No working Viper-to-Viper calls. Calling one Viper helper from another boxes the arguments back through the MicroPython runtime, or fails to compile with on Cortex-M33. Every hot kernel, especially, has to inline its own memory reads, writes, and bank switches into one self-contained function. Explicit casts. Reading a byte out of into a typed local needs an explicit , or the on-device compiler stops with . No dynamic structures. No dicts, no objects, no tuples in the inner loop. Primitive arrays and pointer arithmetic only. : 2 KB internal CPU work RAM (mirrored up to ) : 256 B object attribute memory (sprite OAM) : 32 B active palette RAM : 4 KB VRAM and nametables : 8 KB pattern table and CHR RAM window : 8 KB battery-backed save RAM ( on the 6502 bus), mapped when the cartridge claims it : 8 KB spare tail reserved for cartridge expansion Eight buttons, NES-shaped: four D-pad channels, two right-hand action pads ( for A, for B), and two pads in the middle ( for START, for SELECT). All eight are touch channels, and the firmware exposes them as logical actions rather than fixed GPIOs. Automatic rotation ( ): the IMU notices the inverted orientation, flips the screen buffer 180°, and the logical mapping swaps and . Bypassing the display compositor at 230 MHz. We initially experimented with , which worked for smaller ROMs in internal SRAM but pushed the shared QSPI Flash/PSRAM bus ( ) to 150 MHz and locked up the QMI bus on larger cartridges. Keeping the badge’s stock 230 MHz clock (already a 53% factory overclock over the RP2350’s 150 MHz spec, keeping the QSPI bus at its 115 MHz ceiling) and configuring , , and gave us a rock-solid, low-overhead display path. Removing runtime division. Even inside Viper, or emits calls to the C helper, 7,680 of them per frame. Replacing all tile coordinate math with bit shifts ( , ), pre-populating the universal background color into palette slots for branchless lookups, and fast-pathing empty 8-pixel tile rows ( ) cut + from 41.0 ms to 9.4–12.1 ms. That is 3.4×. One Viper call per scanline instead of per instruction. Moving the entire scanline instruction loop ( ) inside Viper reduced ~10,000 Python-to-Viper transitions per frame down to 262 (one per scanline, returning briefly so Python can service bank switches). Caching , , , , , , and the PRG bank offsets in local ARM registers, and replacing the 55-deep linear opcode chain with a balanced five-level binary search tree, roughly halved dispatch overhead. Fast-forwarding idle spin loops, then frame pacing. Zelda and Super Mario Bros. spend dozens of scanlines spinning in two- and three-instruction loops waiting for a sprite-0 HUD split ( , ) or the VBlank NMI flag ( ). When we see a taken backward branch ( in ) that lands on a pure read, the emulator fast-forwards the rest of that scanline in one step. went from 32.0 ms to 11.6 ms (3.0 ms in Tetris ). Then stepping two logic frames per rendered frame whenever wall-clock delta exceeds 18 ms keeps game logic at 60 Hz. Rendering is honest about its limits: about 42 FPS uncapped in Zelda (23.7 ms/frame), 32 FPS with the FPS counter and sidebar drawing, 58 FPS in Tetris (10.9 ms of work per frame), which is smooth enough to play. Idle auto-save. Every 60 seconds, as soon as you briefly let go of the buttons (so a flash write never interrupts a jump or a sword swing), the emulator snapshots CPU registers, PPU latches, VRAM, and SRAM to flash in about 160–390 ms and flashes in the right gutter. Save on pause, exit, and HOME. Holding A + B (or START + SELECT) for 650 ms saves and opens a pause overlay: , , , , , . The HOME pad on the back fires an IRQ ( ) that saves and returns cleanly to the MonaOS launcher. Relaunching a game marked restores the exact frame and position in 14 ms. Mount the badge as USB storage. Plug it in over USB-C and launch the USB Disk ( ) app from the MonaOS menu. It shows up as a removable drive ( on Windows, on macOS). Clone and copy : macOS (zsh): Badge not at ? Run to find it — some Macs mount it as or . Windows (PowerShell): Drive letter varies — check File Explorer if doesn’t exist. Add your own ROMs that you’ve dumped yourself and legally obtained. No ROMs are included or linked: macOS: drop any file into ( , , , , , , , , , etc.) — Finder drag-and-drop works too. Windows: same files into . Eject & play. Safely eject the drive (macOS: right-click → Eject or ; Windows: system tray → Safely Remove), pick NES from the MonaOS menu, turn the badge upside-down so the capacitive pad sits under your thumbs, and go.

0 views
xenodium 5 months ago

agent-shell 0.55 updates

It's been a little while since my last agent-shell update , so let's go through the latest highlights as of v0.55. agent-shell is a native Emacs mode to interact with AI agents powered by ACP ( Agent Client Protocol ). If you noticed slower project activity in April, this is why . I'm getting better at the new 24-hour job , so I've resumed working on agent-shell . I'm still chipping away at the backlog that built up while I was away, but if there's anything in particular you'd like me to look at, feel free to ping. With Anthropic's SDK subscription support changing , Google's Gemini CLI deprecation , and Antigravity's unclear support for the Agent Client Protocol (ACP) , vendor-neutral tools matter more than ever. Luckily, is built on ACP , which sidesteps the problem. When a vendor changes course, you can swap providers and keep using your preferred tool. No need to reshape that hard-earned muscle memory. On that note, the list of agents supported by continues to grow. Here's a list of the latest agents now supported by . Speaking of vendor-neutral tools being more important than ever, there are a couple of ways to help keep going. Some cost money, others just a click. All are appreciated ;) has been attracting quite a few users. It's nice to hear folks are using on a daily basis. They are often relieved exists as an alternative to AI-tools commonly mandated at work. Those tools have well-funded engineering teams behind them, while is just me, an indie dev ;) Time spent on is time away from work that pays the bills, so if it's useful to you, please consider sponsoring the project. Every individual sponsorship genuinely helps keep the project going. And if your employer benefits from your use, they're typically in a position to contribute at a scale individuals can't, so nudge them to chip in too. Hey, I'm looking at you, folks at Google , GitHub , GitLab , NVIDIA , Oracle , Red Hat , Yelp, Venmo, ARM , Spotify , Augment Code , Hinge, Mercury, Nubank, Veeva… Some of you are using . Nudge your employer ;) Anthropic offers 6 months of free Claude Max 20x for qualifying open-source projects with at least 5,000+ GitHub stars. Starring agent-shell costs nothing and can save me some money. We're only a 5th of the way there ;) so if you don't mind a couple of clicks, the project can really use another GitHub star . Speaking of GitHub stars, is now my most popular Emacs package, recently overtaking chatgpt-shell . agent-shell now ships with a brand new, more performant inline markdown renderer. This is the biggest internal change in some time. Enabled by default via (moving away from the overlay-based renderer in shell-maker). Table content is now accessible. Point can land on any cell, which wasn't possible with the previous overlay implementation. In addition, tables are now also navigable: and move between cells. Source-block syntax highlighting is now on by default. The per-snippet copy button is now keyboard-accessible too (previously mouse-click only, due to the overlay implementation). Blockquotes now render in both shell and viewport. More importantly, you can select text in either a viewport page (or the shell itself), press (for reply) and the selection becomes a blockquote in a fresh prompt. Session restoration got a meaningful overhaul ( #605 by @nhojb ), now exposed via , with four levels: Feature availability is agent-specific, requiring either or request support. degrades as needed, ultimately falling back to creating a new session. Note that anything but verbosity is fairly new, so please report bugs or rough edges . Relatedly, now defaults to , and has been retired. You can now fork the current session, starting a new shell that shares the conversation history so far and diverges from there. Invoke via . You can now restart the current shell anew (drop history) via or reload (keep history) via . The new and commands create agents anchored at either or a temp directory. Both are also reachable via . acp.el #20 by @martenlienen landed support for ACP connections over TRAMP, now making it possible to drive remote agents from . Pair it with agent-shell-tramp for the user-facing integration. Viewport interaction continues to be my primary way to interact with agents. It is focused (see only the latest interaction), fast (single-key bindings: = yes, = continue, = more…), and offers a richer editing experience (dedicated prompt-crafting buffer). The viewport is just a viewport to shell content. You can have your cake and eat it too, by jumping to the related shell buffer if needed. From a viewport, you can press to reply to the latest agent response. In the past, you could only reply to idle agents. You can now press to reply to busy agents too, automatically queuing requests on submission. A new (basic) lets you edit list-style content inside the viewport. Some commands prompt you to pick one of your active shell buffers (e.g. ). The picker now shows extra context for each buffer to help you choose. The same mechanism is now used by the new command. More on the underlying API later. Folding got smarter ( #608 by @codeluggage ): Together they replace the previous , which is now an internal primitive. You can now press from a viewport to quickly send a "continue" request, joining the rest of the single-key reply shortcuts: Tool call status is now rendered as a compact icon-based label by default ( ). ships several alternatives, picked via . To get the previous word-based label back: You can now set a default model and session mode for Codex via and ( #405 by @robjgray ). Both must match an ID from Codex's "Available models" / "Available modes" listings. Headers had a few rendering hiccups on Emacs 31. These are now fixed ( #588 and #590 by @nhojb , #463 by @ftlio ). Warnings from deprecated usage were also cleared. is now a supported clipboard handler for pasting images on Wayland ( #461 by @martenlienen ). Similarly, pasting clipboard images now works on Windows via PowerShell ( #572 by @repelliuss ). The graphical header got minor tweaks here and there. For example, thought level is now displayed in the header. It can be changed via as well as menus ( #601 by @martenlienen ). agent-shell now supports ACP session config options ( #553 by @greggroth and #613 by @catern ). Bind (or call ) to pick from the options the agent advertises. Broadcasted as and available externally via . You can now skip interrupt confirmations by unsetting ( #424 by @emil-e ). You can now resume an existing session by its ID via ( #332 ). Primarily useful for external integrations. You can now use to tag or transform outgoing requests. now broadcasts events ( #509 by @arthurgleckler ). returns the underlying shell buffer for the current context. jumps to the latest prompt/response pair, while returns the interaction at point as data. returns , , or status for any shell buffer. The agent-supplied session title is now exposed via the event (delivered via ) ( #559 by @smagnuso ). Can be handy for buffer names, bookmarks, or recent listings. The family of third-party packages keeps growing. Recent additions: Thank you to all contributors for these improvements! Beyond what's showcased, I've poured much love and effort into polishing the experience. Interested in the nitty-gritty? Have a look through my regular commits . If agent-shell is useful to you, please consider sponsoring the project. I'm now back to working on daily. LLM tokens aren't free, and neither is the time dedicated to building this stuff (especially as an indie dev). I also have bills to pay ;) Unless I can make this work sustainable, I will have to shift my focus to work on something else that is. ✨ Sponsor agent-shell ✨ CodeBuddy ( new by @illidan127 ) Factory Droid GitHub Copilot CLI Hermes ( new by @yitang ) Kimi Code ( new by @nicolaisingh ) Mistral Vibe (default): title only, so restore is fast and quiet (needs support). : render the last prompt turn (needs support). : render the first and last prompt turns (needs support). : replay the whole conversation (needs support). toggles the fragment at or near point (DWIM). cycles globally between all-expanded and all-collapsed. : replies "continue" (new) : replies "yes" : replies "more" : replies "again" … : replies with the corresponding numbered choice : opens the reply compose buffer : same as , with the agent response quoted agent-shell-knockknock : Notifications for via knockknock.el . agent-shell-notifications : Desktop notifications for events. agent-shell-hud : Real-time status overlay via a floating dashboard. agent-shell-pet : Codex-like pets that broadcast agent-shell session states. agent-shell-tramp : Tramp integration for . agent-circus : Run AI coding agents in sandboxed Docker containers. #308 : Fix heartbeat nil value crash in timer and busy indicator ( @ElleNajt ) #340 : Add documentation about the OAuth Anthropic authentication ( @chemtov ) #397 : Add detailed context usage indicator mode ( @emil-e ) #398 : Expose outgoing-request-decorator as a defcustom ( @emil-e ) #405 : Codex defaults for session mode and model ( @robjgray ) #408 : Use diff-command for diffing ( @timfel ) #413 : Track and manage diff buffers for each permission request ( @emil-e ) #418 : Add defvar for agent-shell-mode-hook + test ( @emil-e ) #420 : Replace all references to "Claude Code Agent" with "Claude Agent" ( @jinnovation ) #421 : Add agent-shell-clear ( @Makesesama ) #424 : Add agent-shell-confirm-interrupt option ( @emil-e ) #425 : README: Update all references to Claude Code ( @jinnovation ) #429 : Viewport attachment fixes ( @nhojb ) #438 : Fix for structured input from toolCall.rawInput.plan ( @timfel ) #442 : Add related project to README.org ( @rpoisel ) #445 : Use project-name instead of default-directory in header ( @bcc32 ) #446 : Droid: use native acp client and support default model and mode ( @kohnish ) #450 : Fix restart using wrong default-directory ( @zackattackz ) #453 : Ensure that viewport compiles ( @martenlienen ) #457 : Prefer cache directory over tmp for caching ( @martenlienen ) #460 : Unhandled method returns an error, unblocking client ( @0x6362 ) #461 : Add wl-paste as a Wayland image handler ( @martenlienen ) #463 : Fix header text invisible when font-get :size returns 0 ( @ftlio ) #469 : Do not create a file if no image in Wayland clipboard ( @martenlienen ) #473 : Caching project files completions for improved performance ( @Gleek ) #477 : Handle non-text content in user_message_chunk during session load ( @Gleek ) #483 : Add CodeBuddy agent support ( @illidan127 ) #489 : Snapshot session strategy in any case ( @timfel ) #492 : Update claude-agent-acp repository ( @Gleek ) #498 : Normalize missing MCP transport collection fields for ACP compatibility ( @CsBigDataHub ) #503 : Add agent-shell-macext to related projects ( @cxa ) #509 : Add ( @arthurgleckler ) #513 : Quote reply to the complete response with ( @martenlienen ) #515 : Make detection of binary files more robust ( @martenlienen ) #523 : Add agent-shell-org-transcript to Related projects ( @lllShamanlll ) #528 : Add support for Kimi Code CLI using ACP ( @nicolaisingh ) #529 : Sort the session list based on recency ( @smagnuso ) #530 : Add simple blinking circle as busy indicator ( @rudolf-adamkovic ) #532 : Fix removing queued messages ( @Gleek ) #536 : Add programmatic query API: agent-shell-query and agent-shell-shell-buffer ( @eddof13 ) #539 : Add ob-agent-shell to related projects in readme ( @eddof13 ) #545 : Keep buffer name on agent-shell-reload and -restart ( @timfel ) #550 : Add agent-recall to related projects ( @Marx-A00 ) #551 : Avoid gitignore update for external data dirs ( @Silex ) #552 : Use helper function from shell-maker rather than eob ( @smagnuso ) #553 : Add ACP session config options support ( @greggroth ) #554 : Fix error when cancelling session selection prompt ( @Gleek ) #555 : Add some niceties useful for ( @vermiculus ) #559 : Expose topic in agent-shell ( @smagnuso ) #561 : Update Pi coding agent logo to look more official ( @jeff-phil ) #565 : Enable @ and / completion when reading queued prompts ( @Gleek ) #571 : Fix unkillable buffer after major-mode change ( @Scott-Guest ) #572 : Add clipboard image support for Windows ( @repelliuss ) #574 : Add agent-shell-pet link to README ( @lgmoneda ) #582 : Add a few additional forward declarations ( @tychoish ) #583 : Add Hermes Agent support ( @yitang ) #588 : Fix header foreground color (emacs 31) ( @nhojb ) #589 : Only trim response region when region is active ( @martenlienen ) #590 : Fix context-limit header color (emacs-31) ( @nhojb ) #595 : Fix completion regression in viewport buffers ( @Gleek ) #600 : Do not emit permission-request for auto-handled permissions ( @Gleek ) #601 : Expose thought level (reasoning effort) in header, mode line and keymaps ( @martenlienen ) #602 : Update README with Opencode and Ollama setup instructions ( @dvictori ) #605 : Add defcustom ( @nhojb ) #608 : Toggle folding for everything & comfortably fold at point ( @codeluggage ) #609 : Prevent accidental auto-scrolling in viewport buffers on tool calls ( @martenlienen ) #611 : Fix ( @TamsynUlthara ) #613 : Improve completion for set-session-config-option ( @catern ) #618 : Fix header not showing session mode name ( @deftsp ) #621 : Reindent Elisp files ( @bcc32 ) #623 : Add agent-shell-hud to related packages ( @nohzafk ) #625 : Fix source-block face background not rendering when theme loads after package ( @phairoh ) #627 : Hermes: add default-session-mode-id to match other agents ( @yitang ) #629 : Write to instead of ( @phairoh ) #632 : Render tool call parameters for non-standard tools like MCP calls ( @martenlienen ) #633 : Add GitHub Actions workflow for ERT tests ( @phairoh ) #634 : Update art generated by ( @TamsynUlthara ) #639 : Preserve window position when restarting ( @Gleek ) #202 : Header icon is double the expected size #278 : Heartbeat causes high CPU usage with many agent buffers #366 : directory at risk when switching git branches #400 : errors with "Text is read-only" #401 : Garbled characters output when using non-English languages #412 : Diff buffer management is messy #414 : timing makes subscribing to events difficult #417 : Unhandled notifications with kiro #426 : Starting conversation before agent has initialized leaves "dangling" text #431 : Heartbeat timer keeps running after failed/abandoned authentication in OpenAI #435 : clipboard handler silently saves text as PNG in terminal mode #441 : Background agent notifications treated as stale after response #443 : : Invalid image type on calling agent-shell #455 : agent-shell enters frozen/hanging state when receiving unknown notifications #462 : Header text invisible when returns 0 #465 : Session load crashes on non-text user message chunks (e.g. images) #466 : / now focus the originating shell #468 : breaks pasting text #481 : History input rolls back in editing mode while pressing up/down arrows #485 : Shells created in other workspaces no longer display #493 : Tables rendered in agent-shell break cursor (point) navigation #533 : Can't install agent-shell from MELPA #548 : Copied highlighted text from agent output includes trailing backtick #563 : "Cannot modify map in-place" when starting agents #577 : does not work in an function #587 : Long region preview's "Expand…" button is sent literally to the agent #617 : OpenCode: consent prompt shows empty input when arrives before populates

0 views
dfir.ch 7 months ago

Brucon: Anti-Forensics (and Anti-Anti-Forensics) Techniques

Abstract A full-spectrum dive into anti-forensics across Windows and Linux (with a tad of MacOS, if time permits), centered on real incidents and modern attacker behavior. The course walks through classic log wiping, deeper filesystem tricks, PowerShell, timestomping, sandbox artifacts, memory-only execution, endpoint solution blind spots, and advanced Linux log manipulation. Each technique is paired with detection logic, weaknesses in attacker tradecraft, and practical forensic recovery paths. The material emphasizes hands-on analysis, including MFT/MSRUM/USN artifacts, ETW traces, VHDX extraction, /proc-based investigation, and highlights new research and tooling that shape current offensive and defensive strategies.

0 views
Krebs on Security 11 months ago

Microsoft Patch Tuesday, December 2025 Edition

Microsoft today pushed updates to fix at least 56 security flaws in its Windows operating systems and supported software. This final Patch Tuesday of 2025 tackles one zero-day bug that is already being exploited, as well as two publicly disclosed vulnerabilities. Despite releasing a lower-than-normal number of security updates these past few months, Microsoft patched a whopping 1,129 vulnerabilities in 2025, an 11.9% increase from 2024. According to Satnam Narang at Tenable , this year marks the second consecutive year that Microsoft patched over one thousand vulnerabilities, and the third time it has done so since its inception. The zero-day flaw patched today is CVE-2025-62221 , a privilege escalation vulnerability affecting Windows 10 and later editions. The weakness resides in a component called the “ Windows Cloud Files Mini Filter Driver ” — a system driver that enables cloud applications to access file system functionalities. “This is particularly concerning, as the mini filter is integral to services like OneDrive, Google Drive, and iCloud, and remains a core Windows component, even if none of those apps were installed,” said Adam Barnett , lead software engineer at Rapid7 . Only three of the flaws patched today earned Microsoft’s most-dire “critical” rating: Both CVE-2025-62554 and CVE-2025-62557 involve Microsoft Office , and both can exploited merely by viewing a booby-trapped email message in the Preview Pane. Another critical bug — CVE-2025-62562 — involves Microsoft Outlook , although Redmond says the Preview Pane is not an attack vector with this one. But according to Microsoft, the vulnerabilities most likely to be exploited from this month’s patch batch are other (non-critical) privilege escalation bugs, including: – CVE-2025-62458 — Win32k – CVE-2025-62470 — Windows Common Log File System Driver – CVE-2025-62472 — Windows Remote Access Connection Manager – CVE-2025-59516 — Windows Storage VSP Driver – CVE-2025-59517 — Windows Storage VSP Driver Kev Breen , senior director of threat research at Immersive , said privilege escalation flaws are observed in almost every incident involving host compromises. “We don’t know why Microsoft has marked these specifically as more likely, but the majority of these components have historically been exploited in the wild or have enough technical detail on previous CVEs that it would be easier for threat actors to weaponize these,” Breen said. “Either way, while not actively being exploited, these should be patched sooner rather than later.” One of the more interesting vulnerabilities patched this month is CVE-2025-64671 , a remote code execution flaw in the Github Copilot Plugin for Jetbrains AI-based coding assistant that is used by Microsoft and GitHub. Breen said this flaw would allow attackers to execute arbitrary code by tricking the large language model (LLM) into running commands that bypass the user’s “auto-approve” settings. CVE-2025-64671 is part of a broader, more systemic security crisis that security researcher Ari Marzuk has branded IDEsaster (IDE  stands for “integrated development environment”), which encompasses more than 30 separate vulnerabilities reported in nearly a dozen market-leading AI coding platforms, including Cursor , Windsurf , Gemini CLI , and Claude Code . The other publicly-disclosed vulnerability patched today is CVE-2025-54100 , a remote code execution bug in Windows Powershell on Windows Server 2008 and later that allows an unauthenticated attacker to run code in the security context of the user. For anyone seeking a more granular breakdown of the security updates Microsoft pushed today, check out the roundup at the SANS Internet Storm Center . As always, please leave a note in the comments if you experience problems applying any of this month’s Windows patches.

0 views
Jason Scheirer 1 years ago

I Don't Like that I Like Starship

I have my seed Starship config up as a Gist. Starship is a tool that frustrates me because it seems so bikesheddy and unneeded: a custom prompt manager. We already had shell prompt customization! I blindly install on new machines for prompt customization! And Starship is written in Rust. People just use Rust to be cute. Then I realize that it’s okay to have nice things. The command line environment from the 90s can change. doesn’t suck. is right up there with Perl in opaque tools other people do interesting things with and then I steal the interesting things for myself. The TUIs don’t suck. I mock Textual and Charm openly and unrepentantly and still hypocritically use and enjoy the tools built with them. The terminal is changing because the people using it have the agency and hubris to use it differently. I can have a growth mindset and accept that But its killer features: So here it is. All this talk for something that doesn’t look substantively different but compounds into feeling different over the course of the days and weeks I use it: The preferred command line tool to do a thing can change in my lifetime and The preferred workflow to accomplish a task can change in the face of new tools and The people who invented the old tools we’re replacing were not gods, they were just as fallible as us so Writing new tools that learn hard lessons from decades of using the old ones is fine. It’s not sacrilege. Limited/Constrained/Opinionated : Other prompt customization schemes I’ve used have let you do anything , but you had to know how to do anything . I can’t think of cleverness I want in my prompt, I just want to see which Git branch I’m on. We’re all doing that. We all want that. Starship has a way to do that which isn’t brittle bash I have to maintain myself. Multiplatform : I have Windows Bash, Windows PowerShell, Linux Bash/Zsh, and macOS Bash/Zsh all driven by the same seed config. I can have it show the same information everywhere. I can use little emblems to let me know if I’m on my Mac, on a Linux machine, if I’m on Windows and if that’s PowerShell or Bash all right there. The Nerd Font Dark Horse : This system takes advantage of the glyphs in Nerd Fonts and normalizes abusing them. This adds the additional “burden” of installing a Nerd Font enabled typeface on all my apps with terminal editors, but I’ve already normalized that.

0 views
Kix Panganiban 1 years ago

Unhogging RAM from WSL

I have 64 gigs of RAM. I thought that was plenty, but recently I've noticed Libre Hardware Monitor reporting that I was consistently at 90% RAM usage. Opening Task Manager reveals that VmmemWSL.exe was consuming 30GB of RAM -- but when I ran inside Ubuntu running on the Windows Subsystem for Linux (WSL), it was only reporting 6GB of use. I also run Docker, but it's reporting only 2GB of use. So where did the rest of the ~22GB go? It turns out it has something to do with the way WSL's dynamic memory allocation works (hence VmmemWSL.exe), and how it doesn't immediately free up memory from the host OS even that memory is no longer in use by the Linux OS. The fix was to do: So now, WSL only ever hogs up to 16GB of idle RAM -- which is still a lot -- but I now have plenty of RAM available again for my Windows host. in Powershell to force free the memory Create with the following contents Restart WSL with in Powershell Comet was eating 6GB of RAM with only a few tabs open. Chromium, am I right? I wish there was Orbstack for Windows

0 views
Takuya Matsuyama 1 years ago

How to automate signing your Windows app with Certum's SimplySign app

I’ve been running a SaaS for 9 years, which includes an Electron app for Windows. For code signing, I’ve been using Certum's Code Signing Certificate: The pricing has been great, but there’s been one small annoyance that makes automation a bit tricky. In this post, I’ll share how I worked around it. Certum uses an app called SimplySign to handle authentication. This app is required for signing but unfortunately makes it impossible to automate the code-signing process out of the box. By default, SimplySign Desktop isn’t connected: You need to manually double-click the tray icon and enter a TOTP (Time-based One-Time Password): The code is generated by their mobile app. This manual step breaks automation because, without completing it, you can’t use — the private key isn't loaded until SimplySign authenticates. While setting up SimplySign, you scan a QR code to activate your account: It turns out that this QR code contains a standard URI. You can scan it with other password managers like 1Password — and indeed, 1Password shows the exact same token as the SimplySign app. When you click the Edit button, you can reveal the underlying URI. This means you can generate the token programmatically using a script! Here’s a PowerShell snippet that generates a TOTP using inline C#: This alone gives you the token. Now, let’s use it to automate the authentication step. PowerShell can simulate keystrokes sent to a window. This snippet searches for the SimplySign Desktop window and, if found, sends the TOTP code via simulated keystrokes. Here’s the full PowerShell script you can use to automate the entire process: You’ll need to define these environment variables: I keep these in a file and use to load them when running the script. I hope this helps you automate code signing with Certum and SimplySign! Looking for a good Markdown tech note-taking app? Here is what I'm building:

0 views
dfir.ch 2 years ago

ScriptBlock Smuggling

Introduction PowerShell’s Script Block Logging is a security feature that records and logs the contents of all scripts and commands executed within PowerShell. This includes both legitimate administrative scripts and potentially malicious commands. When enabled, Script Block Logging generates detailed logs stored in the Windows Event Log under Microsoft-Windows-PowerShell/Operational. I have previously tweeted several times about PowerShell and why monitoring the executed PowerShell scripts is so important. A few of these tweets are listed here.

0 views
Danny McClelland 3 years ago

Running Powershell Script an Elevated User

When running a powershell script, I often find I need to run the script in an elevated prompt. The nature of my job is that often these scripts will be run by people that don’t really know what Powershell is. I have found it quite useful to first create a bash script that the user executes, which in turn calls the actual Powershell script as an elevated user. To keep this handy, I’m posting it here for future me.

0 views
W. Jason Gilmore 18 years ago

Improving the Windows Console

Although over the years I've run a number of Linux distributions on my main development laptop, for some time now I've been running Windows XP. Of course, anybody who is even vaguely familiar with Linux' powerful command-line interface shudders at the notion of using Windows pathetic console, and accordingly I regularly gnash my teeth over dealing with even rudimentary administration issues. Personally I've never been a fan of Cygwin, and so have sought out other alternatives to the console. As an alternative to Windows' terminal window, I've long used Console, an open source terminal window replacement which among other things allows the window to be resized. It also supports tabbed windows, meaning you can easily navigate between your MySQL client, Rails console, and Rails log windows for instance. But even a vastly improved terminal window doesn't resolve one of Windows' other wildly annoying features, or rather lack thereof: crucial commands such as "tail". DOS' built-in “more” command doesn't allow you to view the last X lines of a file, and for crying out loud you'd think they'd have thought to add the tail command to Powershell (such a command exists, but they've mysteriously decided to call it "get-content". "tail" must have been too obvious a choice). Seriously, admitting Unix got something right must be akin to devil worship in Redmond. At any rate, you can add “tail” to your system by installing the Windows Server 2003 Resource Kit Tools package, which is freely available from the Microsoft site. Once installed, you'll have a very Unix-like tail command at your disposal.

0 views