TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why don't banks render numbers as PNGs instead of using HTML?

2 点作者 4RealFreedom9 个月前
I&#x27;ve been thinking about scammers lately and thought about rendering numbers as a png in browsers instead of displaying them as HMTL for banks. This would ensure scammers can&#x27;t just go in and edit the html on the fly potentially saving some people from this kind of attack.<p>I played around with libvips and can easily create a png with any text.<p>vips text x.png &quot;1,234,567&quot; --width 100 --align centre --dpi 340<p>Any thoughts on why this shouldn&#x27;t be done?

8 条评论

solardev9 个月前
I don&#x27;t understand your threat model:<p>&gt; This would ensure scammers can&#x27;t just go in and edit the html on the fly<p>How would the scammers &quot;edit the HTML on the fly&quot; of a bank&#x27;s website that they don&#x27;t control...?<p>If they can control it somehow (either via a hack, local malware, browser extension, or just hand-editing the site on the victim&#x27;s computer)... well, they can just as easily replace your PNG with one of their own, or just replace it with regular HTML numbers.<p>If someone can control the bank website, it&#x27;s game over. It&#x27;s not a matter of graphics vs text?
评论 #41302540 未加载
theandrewbailey9 个月前
1. This would break accessibility requirements.<p>2. Scammers can fake PNGs just like HTML.
评论 #41302560 未加载
akshardave9 个月前
This is a legit good idea and I don&#x27;t think there&#x27;s any reason not to do this. I had a similar idea to instead render the balance amount inside a canvas to make it difficult for a scammer to change it. Could also add event listeners to the canvas so when the canvas element or its nearby&#x2F;parent elements get removed or changed, the page could automatically logout and show an alert message warning about a possible scam. For accessibility, aria-* tags could still be added and there could be ways to allow copying the balance amount too.
al_borland9 个月前
I often login to my bank to copy an account number when I need it. I don’t like to rely on typing it correctly. This change would kill that. Sure, I could use OCR on the image, but that isn’t 100% perfect, like a text copy is.<p>They will also likely just come up with a small tweak on the scam if there is a change like this. I’ve watched some of the videos where they pull up a command prompt and run a script where the user is entering the amount to transfer into the CLI. When they type the amount the scammer slips in an extra 0 before the user presses enter. If someone is going to fall for entering their info into a strange black box with text, they will fall for literally anything. The scammer could simply delete the image on the page so the balance doesn’t show and say there is a bug… or delete the image and replace it with text, even if it looks off, the type of person being targeted won’t catch it.
评论 #41304857 未加载
tonetegeatinst9 个月前
Probably accessibility reasons. Even ancient browsers or obscure browsers support text. Their is a non zero chance a browser wouldn&#x27;t support the image format, or the image might not scale across different screen sizes. Also iirc their was some vulnerability that used a image format so that&#x27;s also a issue to think about.<p>Finally, text makes web scraping&#x2F;parsing much easier, and even ignoring that text is smaller than any image format.
评论 #41303782 未加载
stop509 个月前
Then how do access people with vision problems the website? Afaik only the banks in Germany use FINTS for banking
评论 #41302606 未加载
Ekaros9 个月前
If you are already dealing with scammers. Well they will find the ways around it and put energy in it.<p>And for the rest it will just many times annoy them for no gain.
nextos9 个月前
My bank used to do this. They also forced you to type things for certain operations using a screen keyboard where key labels were shuffled.