Blog

Google+
My personal blog is about stuff I do, like and dislike. If you have any questions, feel free to contact. My views and opinions are naturally my own personal thoughts and do not represent my employer or any other organizations.

[ Full list of blog posts ]

Banking Security, PSQL 10, 2FA, Trim, Astronomy, CAPTCHA, Retail Tech

posted Feb 18, 2018, 12:01 AM by Sami Lehtinen   [ updated Feb 18, 2018, 12:02 AM ]

  • Banking security is weakening. Now it seems that many banks are moving their banking applications completely to mobile. Dropping the 2FA features completely. I'm not sure if this is a good thing. We all know that mobile phones are very hackable. And there's no real 2FA anymore, when mobile phone alone is used for everything. I find this bit problematic. I'm pretty sure that everyone with tin foil hat will agree with me. I've earlier written about need for real 2FA which would also authenticate and sign the data, instead of just authenticating "a transaction" without any more detailed context. - After having some discussion with other colleagues, tin foil hats,and nerds. They all seem to unsurprisingly to totally agree with me.
  • New features coming in PostgreSQL 10 - Hash indexes (durable), Parallel Queries, Partitioning, Replication, ICU collations, Integrity Checking Tools, Connection Handling, Quorum Based Replication (awesome!). Also naming some key data clearly, so people don't expect it to be temporary data is quite wise. I've seen so many systems 'pooping' around. And it's very hard to know what is total junk, what's somewhat useful, and what's critical. I'm usually highly annoyed by the fact, that all programs don't make it too obvious. And leave utter crap around, which should have been automatically deleted.
  • Also tested several 2FA authentication applications. Which provide actual strong identity, linked to officially verifiable and confirmed real world identity. Those were great. I'm pretty sure there's going to be serious competition on this platform. Traditionally banks have been providing this service, but now there are mobile operators and maybe soon many others providing strong e-identity. In Finland the ID used to have a chip, and you could have used it. But that project totally failed, no body wanted to use a smart card to prove identity. The on-line banking credentials totally overrun that service with wide adoption. All these providers are linked so that the strong identity can be used with 3rd parties easily.
  • Has anyone taken a look at iostat while running trim? It gives quite a high write rates. I highly suspect there's something wrong with the values being reported. Because it's impossible to get that kind of amounts of data pushed via the bus used with the drive. At least in my case. So I immediately know that the write rates are invalid / incorrect / wrong / too high. kw: linux, fstrim, ssd, discard, iostat
  • TED: Katie Bouman: How to take a picture of a black hole - Absolutely awesome nerd talk - Event Horizon Telescope - Astronomy, Space, Black Holes, Super Computing, Earth Size Telescopes, Math, Algorithms, Terabytes of data, Forensic Reconstruction. Lovely! Yet I kind of didn't like the process of selection based on simulation. Because ahem, isn't that just like skewing statistics by selecting samples? - I could go on with samples, but yeah. I hope you got the point. They're scientists so I'm pretty sure they know what this sounds like at the very beginning. - Oh yeah, they unsurprisingly, got to the point, where they figured out that selecting samples, leads to 'hoped results' whatever those are. - What's the point of trying to use puzzle peaces? How about just combining the existing real data and interpolating it to get higher resolution sample. Instead of using 'puzzle peaces' at all?
  • Git pull requests can be excruciatingly slow due to high number of small 'random writes' to storage medium, especially if it's NTFS volume and syncs to it are slow. This is one of the areas where exFAT is radically faster than NTFS, even if same underlying storage is still being used.
  • I can conclude that the Google CAPTCHA doesn't like my platform. They're always very through with checks, sometimes requiring three or more passed checks.
  • Some unsurprising retail tech trends: Omni / multi channel, Mobile Tech, in-store concepts & digital displays and of course customizing for the individual customer. Bluetooth Low Energy BLE Beacon Technology at Point of Sale. Different system security strategies to make customer data and payment data secure & keeping it private. - Nothing new afaik.
  • Something different: Gunfire locator and Artillery sound ranging.

DB performance, Kalyna, Disk dead, Kludge, MS OTP, Python, ETL

posted Feb 11, 2018, 1:35 AM by Sami Lehtinen   [ updated Feb 11, 2018, 1:35 AM ]

  • Wrote a small transaction & performance testing application, which works on Raima SQL, Microsoft MS-SQL Server (T-SQL), PostgreSQL / Postrgres and SQLite3. All of these SQL databases provide wonderfully different approaches to get same stuff done. Also minor changes in how things are made, greatly affects performance. SERIALIZABLE isolation caused lots of super slow deadlocks on MS-SQL Server. Using UPDLOCK with key queries is 100x faster when updating counters, etc. So many ways to fail and getting things slightly wrong and therefore getting also absolutely wrong results or data messed up in database. Also using ROWLOCK with small test database still doubled the performance for four test threads, when using ROWLOCKs. Reason for this is that most of the records being updated reside on same database PAGE.
  • It seems that Windows is prone to partial crash or hang if disk storage system is slow. Things which are purely ram based, seem to remain working. But everything else is basically dead. This unfortunate situation doesn't at times get automatically fixed, even if disk system starts performing normally. This situation often leads to totally black console screen, or login screen, which doesn't react to anything at all. Interestingly many services still keep connecting TCP sockets etc, but whenever data is being passed to threads which actually do something else, than handle network traffic, things get stuck again. One big problem is still, that nobody knows whats exactly causing it.
  • Checked out Kalyna Cipher from Ukraina.
  • Had lot of discussion with Database Administrator friends about best page size for database. Well, the answer is that it depends from so many factors, that it's hard to say. Most of databases seem to default to around 8 KiB pages. But Some tables benefit from larger pages and others from smaller ones. I personally think that for many reasons like disk storage and memory management, for the general purpose use the 4 KiB page would be pretty much optimal. Also SQLite3 has defaulted to 4 KiB pages since 2016 or version 3.12.0. I've used that page size long before that, because with modern hardware smaller pages won't make any sense.
  • Finally got annoyed enough by Windows 10 updates, to find out the place to change the settings practically. It seems that gpedit.msc is one way and then just configure automatic updates. It overrides all the junk configured in the user interface and gets the stuff finally working as it should have been working all the time. Now Windows updates won't mess up everything, by making systems randomly unavailable.
  • Lot of discussion and testing on SQL Server Performance Tuning matters. See: Wait Stats. Good old: RBAR or Row-By-Agonizing-Row, made me smile again. Transact-SQL (T-SQL). pgSQL.
  • Kludge solutions. Ahh. Those are always as interesting. On the other hand, everyone hates kludge solutions. But if you think it from engineering perspective. It's probably getting done what's required but much less work. Solution might not be pretty or optimal, but it will fulfill the requirements. Is that bad then? Today I recommended kludge solution something pretty similar to VFAT long filenames. Yep. It's not pretty, but it works. And requires 20x less work than 'doing it properly', because it would break so many different dependencies. Just barely good enough, but gets the job done. As example, in this particular case. The kludge drastically improves user experience and usability, even if it's not pretty from hidden technical parts.
  • A friend confirmed that he's also getting the strange error message while doing Microsoft Live login with OTP enabled. Duh. So I'm not the only one having the issue. It's pretty much clear, that they've got some kind of bug with Firefox and their setup, when Firefox is started with 'clean' setup. - Let's see how long it takes before they can fix this kind of challenging fail. Heh.
  • Yes, Python is Slow, and I Don’t Care. I quite much agree with him. But as said, everything is a trade-off. And if you're writing compression algorithm or video encoder for embedded devices, I think high performance options are required. But generally I've been happy with the performance and as being said, usually customers care more about development time (expensive) versus runtime. I just made some load testing for one customer, who was worried about the ETL tasks performance when I mentioned Python. Then we run some codes, and yes, we could double the amount of transactions to be handled daily. And still my ETL task for one days batch, finished under a minute. So I think that's pretty much adequate performance. I do all kind of caching, etc as said earlier. In this case, the database access is slow, processing the actual data is fast as long as you've got it all loaded.

34C3 - TUWAT - Talks - Part 4

posted Feb 11, 2018, 1:20 AM by Sami Lehtinen   [ updated Feb 11, 2018, 1:21 AM ]

  • Social Cooling - big data’s unintended side effect - Very interesting topic. Let's see if they got great points to consider. First they presented concept of click fear. I guess that's very real. Everyone I know got it on some level.  Key concepts: 1. Reputation Economy 2. Behavior Change. Finally 3. how to deal with this. Data Stratification. How Social Credit System it used in China. Social credit affects your changes to get a job, loan, visa, or even a date. Social Cooling, Social pressure. Big data leads to social cooling. It's negative effect. Deemly score. Known public score derivation, versus secret non-verifiable score formation algorithms and methods. Other factors analyzed: "IQ, Psychological Profile, Gullibility, Religion, Estimated lifespan, Rape victim, Political Vies, Potential inheritor, Planning to have a baby, Had abortion, Sexual orientation, Economic stability, Extroversion, Has 'diabetic focus', Easily addict-able, Physical frailty, Education level". Nice. Machine learning algorithms find patters in society we don't expect. Cambridge Analytica. Social profiling, Risk Management, Customized advertising. Data users: "Banks, Insurers, Employers, Governments". Personal comment, I guess that's probably illegal, GDPR. Yet it doesn't matter as long as you don't get caught.- Democratization of the background check. Chilling effects. Social cooling = Social pressure + Self censorship. People are afraid long term congruences: Individual cultural censorship. You do have freedoms, but you choose to leave it unused. Societal value of privacy.  Culture of risk avoidance. Wrong scoring methods bring perverse incentives. Trickle down risk aversion. Politicians and balance for power. Two systems: "Institutional = Free, Crime, Police, Judge, Prison" vs "Social = Suboptimal behavior, Measure & judge, Subtle influence". Key differences: "Institutional = Free until, Punishment, Accountable" vs "Social = All the time, Fear of exclusion, Invisible". Yet "I have nothing to hide" often means "from the institutional old system". Major problem: "Data may damage your job prospects". Stop saying we have nothing to hide. Privacy is the right to be imperfect. Data is a trade-off. More data = Less Autonomy. Social cooling alarm about panopticon, social cooling is about hope. Leads to a world where we are all better behaved, but less human. "Privacy is the right to be human". Link: socialcooling.com - Btw. This was a very nice talk, yet it didn't bring up anything new of course. - Personal comment, this is stuff of all bad sci-fi TV-series coming true.
  • The Internet in Cuba: A Story of Community Resilience - "Get a unique tour of some of the world’s most unusual networks, led by a Cuban hacker". Internet usage is expensive in Cuba. The SNET. El Paquete de Cuba. Not linking directly to the site on purpose. Lot of HTTP login pages without HTTPS, shared connections lead to stealing of credentials. Red Universitaria network (Institutional Internet) using IPv4 private addressing, national network / inter connected networks / WAN. Their version of inter-net, without being connected to the Internet. SNET / La red de la calle. SNET got over 100k users in Havanna alone. Regional Pillars connect Local nodes with directional WiFi as well as Pillars peer with other Pillars. SNET got it's own rules, which you've gotta to follow. One of the rules is that you must not bridge to the Internet. True mesh networking.
  • Address Space Layout Randomization (ASLR) on the line - Practical cache attacks on the MMU. JavaScript based side-channel cache timing attack. TBL. Cache Line. Attacks work on Intel, AMD and ARM. Also from  inside of Chrome and Firefox JavaScript sandbox.

Ubuntu Bugs, Duplicati, OVH, Principles, Integrations, Encryption, Apple Engineering

posted Feb 3, 2018, 11:24 PM by Sami Lehtinen   [ updated Feb 3, 2018, 11:25 PM ]

  • About old bugs in software, it seems that current Ubuntu is still affected by this stupid bug. Or maybe it's Ubuntu malware joining Ubuntu computers to Ubuntu Botnet? What's the point of contacting checking for daisy.ubuntu.com for every 8 seconds? Really annoying. And this is not new.
  • List of Duplicati 2.0 supported backends: aftp, amzcd, azure, b2, box, cloudfiles, dropbox, file, ftp, gcs, googledrive, hubic, mega, onedrive, openstack, s3, od4b, mssp, ssh, tahoe, webdav. Why? Because it's not trivial to get this list, and it's not mentioned on their website, I think. But it's only available from command line help.
  • Boondoggle - Just learned a new word. I guess this is nothing new. There are just so many projects like this out there. But I didn't know there's a specific name for those projects.
  • OVH finally fixed their IPv6 address compression fail. Hah, it took quite a while. Several weeks to get it to work properly. Actually it's still bit funny, now the address is lead zero compressed, but the gateway address isn't. Just so inconsistent.
  • Julia got nice blogging principles - Afaik, nobody should tell what you should do. We can tell what we did and why, but it's up to you to decide what's best approach for you. Things are so complex, there's no one absolute this will be best solution for you for anything.
  • Daily integration limbo. One integration works on around 90% reliability. Customer wanted that if we could add redundancy. Ouch! I don't like that. I would prefer making it reliable, instead of adding triple 90% redundancy, which still isn't reliable. Sigh... It also makes the issues occure less often, which means that nobody bothers to check if it has failed and failures go unnoticed and boom. At some point someone notices that and starts to complain. I don't like that at all.
  • Another problem is that people don't get how integrations work. I always prefer model, where all new data is transferred. It can mean that even if you got only 'todays' batch. It can contain anything, from any previous days etc. This is absolutely the best way to go. But it seems very hard to grasp for some people. They seem to think that the transmission time got something to do with the content. No. It doesn't. Content is content and transfer time is transfer time. Sometimes those correlate in some way, and other times those just won't. But it's annoying to encounter all the time people who seem to mix these things up. Todays file, can contain stuff which is three years old, or it can also contain stuff which is year in future, if someone has just dated the data so. It doesn't mean anything, that you got it 'today'. Sigh. That's exactly why there's time stamps in the data.
  • Integration, why simple is better. - They wanted very cool structured XML - After some discussion. It became evident they'll just extract that XML to CSV. There's no point of making advanced custom formats, which just add intermediary mapping / conversion layers for no reason. After all the coolness of XML discussion. They ended up requiring XML more like. <data><col1 /><col2 /><col3 /><col1 /><col2 /><col3 /></data> Sure. That's doable, but phew just why. Also funny thing is that many of the columns contain redundant data. That's because structure where <data><header /><items /></data> Was way too complex for their advanced integration framework. - Sigh. Ok. It would have been just better to go with tab csv aka tsv from the very beginning. Simple, easy, works. No fuss. Done. I don't mean that making XML or JSON would be any more complex. But for some integrators those just cause so much trouble.
  • Encryption Workarounds - All of these sound pretty familiar to me: Find the key, guess the key, compel the key, exploit a flaw in the encryption software, access plaintext while the device is in use, and locate another plaintext copy. - All pretty obvious and old methods.
  • Still laughing at Apple products. Some of their designs is so highly counter intuitive that it's out right ridiculous! Like when you have fast unlimited data, they're still requiring WiFi for certain things. Like updating things, and syncing stuff, etc. That's just so ridiculously stupid that ... Solution? Have a two Apple phones, so you can network from one phone for the another phone, and vice versa. That's true engineering. - I just can't loving artificially created stupid engineering, which requires even more stupid engineering to work-around. - This is something which is of course long term trend. Whatever service or design is showing such signs, makes me laugh and cry. - Maybe there's some other smarter work-a-round for this, but at least it wasn't trivial to find in 15 minutes.

34C3 - TUWAT - Talks - Part 3

posted Feb 3, 2018, 11:17 PM by Sami Lehtinen   [ updated Feb 3, 2018, 11:18 PM ]

  • Decoding Contactless (Card) Payments - An Exploration of NFC Transactions and Explanation How Apple Pay and Android Pay work. - This one is interesting topic for sure. But unfortunately this talk didn't contain anything new. They said that SIM cards don't provide Trusted Service Manager. Well, some do. I can use strong authentication with my SIM card using SIM Toolkit and Trusted Service Manager. So there's private key, which was generated on SIM card, and the private key is only known by the SIM card, and can't be read from it.
  • KRACKing WPA2 by Forcing Nonce Reuse - Covered the key re-installation attack (KRACK) on 4-way handshake which has been covered in my blog earlier. Nice samples how the handshake works with optional 802.x1x authentication. ANonce, SNonce, used to form forming PTK and GTK. Rest of communication is encrypted. Frame encryption method explained. Keystream XORed with Plaintext data = Encrypted Ciphertext. Nonce starts from zero after PTK key installation. Examples how to execute the attack. Nice slides and process flow description. Retransmitted message #4 should have been sent without encryption according specification. This is great example where using encryption actually breaks security. Actually good example why encryption code where data is xored with keystream are extremely vulnerable to nonce leaks. Allows replay attacks, due replay counter getting reset. Key re-installation attack (KRACK) totally breaks GCMP (WiGig, 802.11ad, GCM) encryption, allowing forge / inject frames in both directions. From client to access point and from access point to client. Group key handshake attack which allows replaying broadcast traffic. FT handshake doesn't have any replay protection. Re-association Response. Nice slides about this case too. All zero encryption key flaw on Android and Linux devices. And more nice details in presentation. Trivial to intercept and manipulate client traffic. Corrections to popular misconceptions. It is required to update / patch both clients and access points, to remedy this issue fully. Own comment, this means that this issue will be remain wild for a decade or longer. It's possible to attack networks far using special directional antennas. Directional antenna with line of sight can work around 12 kilometers away. Attacks are possible if you just know that the network exists, you don't need any kind of pre-knowledge. Forsing new 4-way handshake by sending de-authentication packets. Obtaining channel-based MitM is hard, but it isn't. You can use channel switch announcements. Pre-existing attack scripts are there ready, allowing script-kiddies to use these attacks. AES-CCMP doesn't mitigate the attack, because it still allows decryption & replay of frames. Enterprise networks (802.1x) do use 4-way handshake and are therefore affected. Keep protocols simple. Even CIA says: "Re-keying introduces Unnecessary complexity (and therefore opportunities for bugs or other unexpected behavior) without delivering value in return".  Disclosure coordination challenges. Because they found out this is widespread issue. Conclusion. Flaw is in WPA2 standard. Proven correct but is insecure. Attack has practical impact.
  • Decoding Contactless (Card) Payments - An Exploration of NFC Transactions and Explanation How Apple Pay and Android Pay work - Some keywords from the talk: Credit Card, Issuer, Payment Networks, Terminal, Acquirer, Visa, Mastercard, JCB, Amex. Card Issuing, Terminal Provisioning, Online Authorization, Cryptogram Verification, Transaction Settlement. Contactless Transaction, Data Exchange. EMV, NFC, ICC, HCE, PAN, Android Pay, Apple Pay, Card Authentication, Customer Verification. Point of Sale. ISO-7816, ISO-8583. Host Card Emulation on Smartphone. Limited use crypto keys. Offline transactions. One Time Keys (LUK). Hardware-based Secure Element (SE). Account Data Tokenization. Token Service Provider, Token Requestor. Payment process data flow and exchange. Alternative Payment Methods like Alipay and WeChat. Host Card Emulation (HCE) @ Wikipedia

Python3, OpenPGP, Fisher-Yaters, iLO, iDRAC, LPD443, SDR, Onkalo

posted Jan 28, 2018, 1:38 AM by Sami Lehtinen   [ updated Jan 28, 2018, 1:38 AM ]

  • Did read very long list of What are some WTFs in Python 3. I'm happy, because I knew each of the mentioned issues without any additional lookups or wondering. Usually that's a good sign that you'll know pretty much. When posts listing something strange start looking as business as usual. Yet I have to admit that my code still contains pretty much simple syntax and I'm not always using Pythons advanced features. Especially if programming in rush. Maybe I should play more with the things I'm not always using. I know how to use those features, but it's just not a habit yet.
  • Had a really tiringly long. Discussion about GnuPG, OpenPGP keys and preferences. Phew! I thought that was a topic, which is interesting. But after about 3 hours of tight technical discussion I started to feel tired. I didn't think that would happen with that subject. But when it's get all too paranoid, technical and so on, it's even too much for me. I've found limits of my geekiness. Unfortunately I can't quote the discussions. But it was all about key lengths, different key types, cipher selection preferences, hash strength. Potential attack vectors and all the usual stuff. - Yet I guess that's the feeling people often get when I start talking about some technical details.
  • As said, proficient use of PGP is one way to grab attention. Also I haven't never ever received properly encrypted SPAM. Usually if someone bothers to send signed / encrypted message, it means that they've got something to say.
  • Reminded my self about Fisher-Yates shuffle.
  • Had to administer one HP server with Integrated Lights-Out (iLO). That's actually one of the reasons why I like virtual servers. As long as you don't have any meaningful number of dedicated servers, managing those requires it's own attention. Like updating iDRAC firmwares etc. Also broken integrated administration can be huge security risk AFAIK. Of course there's access control, but it might not be implemented in efficient way. So far, knock knock, the hardware dedicated servers have been working well and we haven't had serious breakdowns. But the question is more like when and not if. With very small number of servers, you don't have any spare parts on hand etc. Which means that the dedicated perfectly working server can turn into very extended downtime when it's getting fixed or replaced after failure. That's also one of the reasons why I like to shutdown old projects, which aren't properly supported. Ok, it runs itself in the closet and nobody needs to care about it. But if it's used for production use and something happens. Then somebody should care and know about it. Otherwise it'll be quite a nasty situation, and it's probable that the systen never recovers and it's end up being not so pleasant discussion. That's a very real risk with old legacy systems which just work.
  • Checked out LPD443 and Short Range Devices (SDR). Some sections of the 5 GHz band are reserved for SDR in Europe. 5725–5875 MHz with especially low power 25 mW only. Some of the cheap basic home automation stuff uses 433 MHz radios. Without any replay protection, it could be fun to play with this stuff, if I would get bored. Just drop smal recorder devices in places where you assume to be traffic and then analyze that traffic and replay it at will. That's IoT at it's best. Messages aren't encrypted, nor even replay protected. You can just go an record messages and playback those and most of devices will gladly follow instructions. It's just like IR remote but just using RF, even on rather low frequency which passes structures well. I wonder how much fun you could have with this, just by recording common command patterns and playing those out with bit more powerful transmitter. Why? Well, just for fun and Lulz to see if anyone notices / cares. Because that's ISM band and also Radio Amateurs use it, it isn't hard to find those bit more powerful transmitters very cheaply.
  • Watched the Onkalo Documentary. This is tough question to crack. But I'm glad, it actually won't be my problem. I'll be long gone. Also somehow stumbled to Ray Cats, that's crazy idea. Modify cats genetically to change color when encountering radioactive radiation. Lulz, what an crazy idea. But it was funny enough to make me smile.

34C3 - TUWAT - Talks - Part 2

posted Jan 28, 2018, 1:30 AM by Sami Lehtinen   [ updated Jan 28, 2018, 1:31 AM ]

  • DPRK Consumer Technology. Year of desktop Android? Red Star (OS) GNU/Linux. DRM and Encrypted PDF files. Decryption and cipher details, re-implemented in Go. Binary code hacking, no source available. Removing secret watermarks from files. Nice talk, but nothing really amazing. Good basic reverse engineering.
  • Protecting Your Privacy at the Border - Traveling with Digital Devices in the Golden Age of Surveillance. Basic solution is not to take anything really private with you. That's obvious. Let's see what the talk provides. Border Checks at areas like: EU, UK, Canada. At borders they claim right to obtain and require passwords. Situation is worst at authoritarian countries like:  Russia, China, Middle East, Turkey. Detaining people for using encrypted communications. United States can deny entry, if you won't give out passwords for your devices & data. Border Crossing Threat Models. Sensitivity of Data. Remember to plan and prepare before arriving at the border. Now it came, what I started with. "Don't bring it". Leave your devices and data at home. If you need data, use encrypted cloud service. Don't carry the data over the border with you. Just one pro-tip compared to the slides, if you got sensitive data, deleting it isn't enough. You'll need to wipe it, or preferably use clean devices, etc. Don't escalate the situation. Don't lie to border agents. Don't consent anything, if it's not required as order. If you for some reason gave any passwords, go and change all of those and related passwords. Then to Technical Protection Measures. Cellbrite. Use full device encryption with strong passphrase. Of course only protects you data in rest. iPhone Secure Enclave. File Locker, dm-crypt, BitLocker. Do not use fingerprint unlock. Always turn devicve of for border crossing. Trusted Boot, TPM, TPMTOTP. Secure Deletion Caveats. BleachBit, scrub, wipe. Don't trust secure deletion, it's imperfect on multiple levels. High risk of failure. Cloud Storage Risks. Power of Subpoena. Provide often only in transit security. Do use secure pre-cloud encryption. Zero knowledge encryption. Nothing new in this talk. All the basic stuff.
  • SCADA - Gateway to (s)hell - Hacking industrial control gateways (ICS), Programmable Logic Controllers (PLC), Remote Terminal Unit (RTU). Security model is air gapping, which unfortunately often isn't true. Closed M2M networks, which you can often break in by stealing one of the devices and using it's SIM card. Started with classic firmware reverse engineering and decryption. of Moxa W2150A. Nice work. Lol, gaining root access by pressing enter key. Good find. Sounds like Apple. ;) HTTP, Telnet, SNMP, configuration protocol. But what's wrong? Cross-site scripting, Cross-site request forger, insecure authentication, command injection, stack overflows. - Sounds like just normal project, everything is more or less broken, if you just go and take a closer look. 90% of devices use default credentials. - Command injection, stealing passwd file using ping test. All classic fails. Trivial denial of service attacks and stack overflow. moxa_pwn. Remote trival root shelling of the device. Was this Internet of Shit? Seems to be so. Next device Advantech EKI-1522. Finding remote code execution quickly from firmware alone, without having the device on hand. Serial console as root, without password again. Also HTTP, configuration protocol (UDP), telnet, SNMP. With Cross-site scripting,Cross-site request forgery, Command injection, Broken authentication. Unlocking device from one computer disables authentication for everyone. Stack overflow in other protocol. Advantech_pwn. Remote root shell on advantech device. Nice. Last Lantronix EDS2100. It was mentioned in device description that it's secure device. HTTP, Telnet, SSL, SSH, FTP, TFTP. Cross-site request forgery, Configuration injection, Authentication bypass. Lantronics_pwn. Many devices are even worse, they said. On some devices you can just get root password via SNMP walk. Summary, Trivial vulnerabilities in most devices. no mitigations whatsoever. Some vendors do not respond to vulnerability reports. Never directly expose these systems to the Internet. Do not use WiFi / GPRS without additional encryption. - Very nice talk, with totally expected results. Things aren't secure, and that's the absolute norm.
  • Cryptocurrencies, smart contracts, etc.: revolutionary tech? by Zooko. Zcash. Bitcoin, Ethereum, blockchain, cryptography, Lightning Network. Long talk with good info. Such a topic, I don't know if I even have strong personal opinions about this. Any opinion can be easily argued against, so it's pointeless to even start discussion.
  • Watching the changing Earth. Started with Gravity, gravitation and geodesy. GRACE satellite gravity measurement project. Gravity field mathematical presentation.Measuring from space Greenland Ice Mass Loss. Satellite Radar Altimetry. Thermal expansion of water. ARGO float network. Components of sea level rise. EGSIEM and ICGEM.
  • How risky is the software you use? - CITL: Quantitative, Comparable Software Risk Reporting. Quite mathematical and theoretical talk. No thoughts or comments.
  • 1-day exploit development for Cisco IOS - MIPS architecture, debugging Cisco IOS.
  • Reverse engineering FPGAs - FPGA hardware and logic gate basics. Lot's of technical reverse engineering, but nothing which I would probably do anything with.
  • Science is broken. Great topic, there's so much discussion about contradicting and or weakly proven research. Randomized Controlled Trial (RCT). Publication bias allows you to create something out of nothing. Long list of different ways how statistics and science is broken. Nothing new really, I think. Same issues have been reported over and over again. Are interesting results better than right results? After all the talk didn't reach deep conclusions and was left bit light, personal opinion.
  • LatticeHacks - Fun with lattices in cryptography and cryptanalysis. Oh well, my expectation is that this is going to be too deep for me, but let's see. Nice, fast talk, awesomeness. Lattice - Lenstra-Lenstra-Lovász (LLL lattice basis reduction algorithm) - Shortest Vector Problem (SVP) - Sagemath for Python. Nice text book example of RSA and immediately warning that naive implementation is insecure for multiple reasons. Factoring with Lattices. Coppersmith / Howgrave-Graham. - Coppersmith attack - Shor's algorithm - Qubits are unreliable. Now it gets interesting, NIST post-quantum competition and post-quantum encryption. Some of new encryption algorithms got broken in hours. NTRU encryption and decryption. After all awesome talk, one of the very best talks.

Zstd, EddyStone, GnuPG / ECC, E/N sites

posted Jan 20, 2018, 11:22 PM by Sami Lehtinen   [ updated Jan 20, 2018, 11:22 PM ]

  • Zstandard compression (zstd) - A very nice post! Any new development in compression is nice. Faster, Better. Neat. It just isn't very standard yet. And yes, we must admit that deflate (zlib, gzip) is an old algorithm. I've been preferring LZMA for a long time, for long term storage / transport over slow WAN networks. Compression is also one of the areas where 'everything is a trade-off' is extremely true. Essential quote from the article: "std level 1 is ~3.4x faster than zlib level 1 while achieving better compression than zlib level 9". That pretty much says it all. Yet as we well know, the data being compressed makes also large difference, other types of data get compressed better / faster using different types of compression algorithms. Dictionary compression is one of the reasons why I chose using blocks for my data archival system. (I've posted about that earlier) One way to do 'dictionary compression' is to prefeed data to compressor, and then flush it's output and not storing that data more than once. Yet this is of course inefficient because the dictionary data gets compressed over and over again. It would be much smarter to be able to store the state, without re-compressing the data, which naturally wastes CPU cycles. In some test cases I've fed 'empty' JSON object to compressor first, flushed it and then compressed it again with the data. To get full benefit of the JSON or XML scaffolding getting compressed away. Works well, but is very inefficient in CPU terms. This post says that syncing dictionary is hard. No it isn't. That dictionary is stored in the same data storage with blob hash. If I change the content of the dictionary, then it'll be stored as new object. I would find that extremely useful feature. When compressing small inputs, also the ordering of inputs does matter. That's why the 7-zip compressor compresses files based on extension order. Trying to group similar kind of files together. If the similar kind of objects are distributed and slide out of the compression window, then the benefit of seeing that data earlier is lost. Library reference: python-zstandard - https://github.com/indygreg/python-zstandard - Question, if framing is heavy weight, how about making it optional to use lighter frames? Yes, also any header is unnecessary. Should be optional, when talking about data compression. File format / stream format is another question. I'm also wondering if the shared dictionary compression mode supports special 'create shared dictionary' mode? Because creating shared dictionary for a data set is different than creating dictionary just for some scaffolding. The shared dictionary should be optimized for all of the data. Usually data compression dictionary isn't optimized like that during normal compression. It's more like cache, which might not present the overall data set very well. It seems that they've been thinking about these questions but aren't covered by this post. - I'm just random hobbyist, they're data compression experts. These are just my random and naive thoughts. Yet the post didn't have anything new in it, it's totally generic discussion about data compression.
  • BLE Beacons with EddyStone support also use 'shared dictionary compression' for protocols and domains. As example 'https://www.' can be all prefixed with one integer identifier, to save bytes.
  • Time came and I had to create new ECC subkeys with GnuPG for specific purpose. Yet it wasn't as simple as I though. Or it would have been, but I think I hit some kind of bug?
    Interestingly enough creating new ECC ed25519 / Curve 25519 key with GnuPG 2.1.11 always fails with error messages:
    gpg: agent_genkey failed: Invalid flag
    gpg: Key generation failed: Invalid flag
    Yet generating Brainpool P-512 key works perfectly. Go figure. I really don't get what I might be doing wrong.
  • Just funny reminded that blogs were called e/n sites before these were called blogs. I think the old name was very nice. "Everything / Nothing", "Eternal / Noise" or "Endless / Nonsense". Yep, endless boring, random ramblings about everything. That's just so true. On the other hand, isn't blog a web log. Just recording some observations about life, tech and everything.

34C3 - TUWAT - Talks - Part 1

posted Jan 20, 2018, 11:12 PM by Sami Lehtinen   [ updated Jan 20, 2018, 11:12 PM ]

Compact list of listened talks and related keywords & personal thoughts:
  • Dude, you broke the Future - Yes, future is extremely hard to predict. Technology is changing so fast. Anyway, only future will tell. We'll see what kind of AI's and "autonomous agents" there will be connected to our IoT and Social Networks stuff in future.
  • The eavesdropping programs of the secret services - Nothing new here. Not news, that everything is being spied as much as possible.
  • The Ultimate Apollo Guidance Computer Talk - Architecture: Memory addressing, CPU registers, Banked RAM / ROM and Assember langauge code, Interrupts and Interrupt Handlers, Counters, I/O registers, absolutely awesome. All the usual stuff. But that's not all, then it continued to the Microcode level. Hardware: Magnetic Core Memory and hand wolven Core Rope Memory. Peripherals. Simply amazing and wow. I mean,of course tech is what it is. But who creates such a great talk, about such an old tech. User Interface: Flashing digits and number keyboard + DSKY buttons with lamps. Cool. So retro. - Lol, system working internally in metric system, but the user interface converted everything into imperial units. - Lecture continues into what else, space navigation. They got autopilot, but we're still waiting one from Tesla. Haha.- Different methods to rendezvous in Moon orbit. - Finally the fun part, what could go wrong? - As general comment, very fast talk too. Tons and tons of information.
  • Just my own thoughts which came up while watching the previous talk: Task queues haven't changed a lot, the task queue with priorities and "postpone execution", is exactly what I've implemented.
  • Internet of Fails - Where IoT has gone wrong -. Lol, not so unexpected either. "FAIL = First Attempt In Learning" - Insecure children's and adults toys. Haha. Regulation, GDPR, data breaches and so on. Also short summaries of just so many security flaws, especially in 2017 of course after the history section.
  • Demystifying Network Cards - Let's see if there's anything new in this talk. Probably not, but you'll never know. - Yep nice talk in general. I'm not afraid of tech stuff, so no worries. I do low level I/O just fine. - Nothing new, thanks.
  • Everything you want to know about x86 microcode, but might have been afraid to ask - This one is quite timely talk, due to important Intel Microcode updates being out there, yet which have been widely reported to be buggy. Microcode isn't signed, it's just check summed. Wow, lots of deep reverse engineering. Microcode level back doors in CPUs. Cryptographic exploits. When things are deeply nested, almost any lawyer can be used to attack the whole.
  • Free electron lasers - Interesting tech stuff, particle physics and synchrotron radiation light sources, x-ray free electron laser. Very good talk, nice introduction, even if this should be known for everyone. It's good to cover background too. Ultrashort pulse, Femtosecond lasers. Wiggler and undulator magnets. X-ray crystallography. Defraction pattern data analysis must be quite CPU intensive task. Even if not directly computer related, this must be one of the most interesting talks. Incoherent radiation to coherent radiation.
  • Unleash your smart-home devices: Vacuum Cleaning Robot Hacking - Hacking using tinfoil. Vacuum cleaner is running Ubuntu. Communication, internal details, processors, operating systems, encryption, cloud APIs. Remote updates. Update process seems to be pretty much what's expected, yet it's bit better done. With decryption, checksums and new root passwords etc. At least they're using static encryption keys and passwords for part of time, which is business as usual. Nice reverse engineering. Rooting vacuum cleaner. Installing own software. Modifying firmware. - Dustcloud. Installing malicious software.
  • Inside Intel Management Engine - Is this official back door by Intel to all Intel computers? Ha? Let's see what the talk offers. JTAG fun. Integrity and Confidentiality Keys extracted.
  • Ecstasy 10x yellow Twitter 120mg Mdma - Old project. But that newer stuff, <script> in bookname broke many sites. Of course this shouldn't happen. But as stated earlier, nobody cares even if e-commerce sites are secure. - Personal experience: Yet this is nothing new, it's so often possible to inject all kind of stuff into systems, javascript, sql, etc. Because nobody mostly cares about things getting seriously broken. - I guess this is nothing new for anyone doing integrations. Everyone always is assuming, that someone else is guaranteeing that the data is valid and secure, until boom. In context of system integration, data isn't handled as 'user input' but already cleaned and secure. Which is of course security failure, but doesn't usually matter at all. Because we're only dealing with trusted parties, right?
  • Deep Learning Blindspots - Interesting title, but is there anything new? Machine learning. Neural Networks, Deep Learning. Adversarial Examples how to fool neural networks. Fast Gradient Sign Method vs Jacobian Saliency Map. Black Box Attacks. Cleverhans, Keras, Theano and TensorFlow. Deep-pwning. Vanderbilt. DeepFool. FoolBox. Evolving AI Lab: Fooling. Uses: Spam filters, Network Intrusion, Self-Driving Cars, Data Poisoning, Malware heuristics, etc. Steganography.
  • Spy vs. Spy: A Modern Study Of Microphone Bugs Operation And Detection. Interesting, more surveillance technology. Off-topic comment, I loved spy vs spy games. - Audio evasedropping is a real threat. Nowadays required technology is ridiculously cheap and widely available. They started with history and The Seal Bug / The Thing. Induction powered devices. Some of the methods: Metallic-point wiring, fiber-optic video surveillance, laser monitoring of sound vibrations on windows, transmitting bug in adhesive material stuck on window, microwave monitoring of computer emissions (TEMPEST), bugs in sockets (phone, electric, light switches, etc), microwave bugs, direct sound surveillance with directional microphones, bugs hidden in desktop items / furniture and so on. Btw, this list was in history section. Surveillance via applications, like FinFisher  and Salamandra SDR @ GitHub.
  • Sockpuppet social media personas - GCHQ social manipulation, FBI tracing user identities, - GCHQ - https://en.wikipedia.org/wiki/Government_Communications_Headquarters - targets hackers. Operation techniques. People targeting. Covert agents spying in multiple chat channels. Private messaged people to corroborate information or entrap them. - I guess this is nothing new. This was problem already decades ago. Personal comment: "That's just why OPSEC is so important when doing something, which isn't public. Requires total personality dissociation and minimizing communication. ". lurl.me. I guess it's not news that URL shortening services are used for click tracking. Even I did that, when I had my own URL shortening experiment. JTRIG, HUMINT operations. Also using proxy to log traffic, sounds well, just decades old school. Been there, done that, of course. Distracting, discrediting and providing disinformation using fake on-line aliases and personalities.Censorship-resistance. Government sockpuppet accounts only posted during WRK hours on UTC. Funny. Basic rule, don't trust anyone. Don't share any information.

WhatsApp, Data Corruption, JWT, Malware, SMR, Cloud Functions, Confide, Drone Defense

posted Jan 20, 2018, 10:56 PM by Sami Lehtinen   [ updated Jan 20, 2018, 11:19 PM ]

  • Verified it again WhatsApp storage space management really sucks. No wonder people are suffering from using WhatsApp. Data isn't getting removed properly. Another persistent annoyance is that you can't move app and or just media to SD card or ext-sdcard whatever it's called with different Android versions and devices.
  • Silent data corruption is real. Yes, it very much is. Most of people think that it doesn't exist, because they don't notice it. But that's generic misunderstanding. I can say software I've written, works best for customers whom aren't using it. Laugh. They never complain about it being broken. But I've covered this topic over and over again. This is one of the reasons why Google does data checksumming, not on storage level, but on application level. Data can be corrupted on so many different levels of the system.
  • Long discussion with friends about JSON Web Tokens security. I don't see why it would be any worse than any other solution. Data is signed, and that's it. It's not JWTs fault, that there's no easy way to revoke tokens. Of course there is, the server just stops accepting the old token until new is aquired. It's not any different from any other PSK solution. Just in this case, there's more data stored on the client end than the PSK / identifier alone. I personally prefer simple shared keys, or temporary keys acquired using more permanent API key.
  • In Schneier's blog The CIA's malware development guidelines - Yeah, sure. All of the stuff is obvious. Yet many of the things don't actually make it really hard for professional test environments, just like using SSL, there are multiple ways to circumvent SSL protection. Also the 'data wiping' can be hard, or extremely hard, or totally impossible, if you go into details. You can't delete any written data from journaling file system. That's the whole point of journaling, if the journals are kept. Just like the normal recovery mode for MS SQL databases. Same applies to memory, in suitable test environment, of course all memory access can be logged as well as any changes to CPU registers etc. Very very long time ago used SoftICE. To analyze and crack some games.
  • Checked out Small Modular Reactor (SMR) concept. Doesn't anyone remember what happened with nuclear batteries / atomic batteries and Radioisotope Thermoelectric Generators (RTG) ? Well, let's hope future will be brighter. What could go wrong? (Everything is just glowing in dark) Just waiting for RORSAT & TOPAZ reactors with plutonium to rain on us.
  • Very nice writing about Internet of Things (IoT), value chain, ecosystem, etc. It's hard to get it all. But you'll need to find right partners to deliver best value proposition to the end customers. As well as IoT requires lot of integration work, so system integrators like me aren't going to run out of work to do in future.
  • UpCloud - launched Amsterdam (AMS) data center (DC). Gotta check it out. Currently it's kind of mixed situation, which server location is best for Finnish customers. Frankfurt (FRA) is likely to be be faster for ISPs using using the Cinia C-Lion1 submarine cable. But for ISPs using traditional route, like Telia / Sonera / TeliaSonera Amsterdam is likely to be faster. Why? Because the traffic is routed via Stockholm and Copenhagen. (This is from April 2017) - Based on very quick testing, Amsterdam is faster for non C-Lion users than Frankfurt. - Situation has remained the same, even when this post has been sitting in the backlog. Just checked it.
  • Google Cloud Functions - What did I say about decades old RPC. It's the very same thing. Just minor changes in the back end side. It's so nice when old is new.
  • I didn't really like Confide, it seems that some other people also think it's all show. It's technical documentation didn't assure me at all.
  • Overkill? Using USD$ 3 million Patriot missile to shoot down USD$ 200 drone. Yes, that's overkill. But now we could ask, what's the defense system on drone against these missile strikes. This is just like the encryption, privacy and security questions. Normal people can do very little, if you think there's world wide high level organization after you. Especially if they don't need to follow any laws and they don't care about breaking existing ones. You're just screwed.
  • UpCloud opened second data center in Helsinki - That's nice, so you can have systems replicating between two separate physical data centers. Not just two computers in a cluster in same rack or so.

1-10 of 530