News for hackers. Stuff that matters.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by db48x on Saturday June 08, 2019 @01:58AM (#20130877)
Hmm. What would you attack? That is, if you were writing a crate that I was thinking of using in my program, how would homographs allow you to compromise my code?
Re:Rust, Macros, λ-calculus/Church numerals, oh my by wyldfire on Saturday June 08, 2019 @11:56AM (#20133040)
The best attack is of an alias of a popular crate. Duplicate the functionality/behavior/version number but include a subtle backdoor.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by db48x on Saturday June 08, 2019 @03:27PM (#20134530)
How would people end up using your evil crate though? I guess you could rely on having people copy and paste code from your documentation or tutorials, but if they just type the name then they get the original.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by saagarjha on Saturday June 08, 2019 @06:55AM (#20131753)
Here’s a somewhat contrived “attack”: I write a crate with two functions that are named similarly, wait for you to integrate it, then file a pull request using the Unicode function name (and hence calling the malicious function) and be relatively assured that if you looked up the function you’d stop reading code at the ASCII one.
Re:Rust, Macros, λ-calculus/Church numerals, oh my by fluffything on Saturday June 08, 2019 @07:24AM (#20131834)
The code published on crates.io does not need to match the code in your github repository, so... you don't need unicode homographs to do this kind of attack.

Also, homographs currently produce a warning...