Saturday, February 10, 2024

Airbnb puts money first and people's safety second

Airbnb does the job and as long as you read carefully u should be fine, EXCEPT, there has been a glaring hole in their booking process for many years now. If you book a place the does not provide the "immediate booking" option then if the host refuses to accommodate you (most often because he/she had not updated the eligibility status of their property) you do get a full refund BUT only after 1-3 weeks depending on your bank's policies. They tell you something like "sorry, we pre-authed the amount and then when the host refused to host you we issued a full refund - it is just that the credit card hold will take at least a week to clear". Bottom line is that if you are low in funds in your card at that moment and you need a booking right away you are basically screwed.

The "full refund but time to reflect" story is just a cheap excuse they have been using for years to excuse outsourcing all risk and hassle to the client while not considering that they sell SHELTER, one of the most basic human needs, and not Gucci bags or some other frivolous thing.

Someone who has had his reservation denied and his funds withheld for weeks before refund may find himself homeless in a place like El Salvador and die in the streets like some homeless bum, if his card is not at the moment loaded enough to make a new reservation. Airbnb is quite indifferent and callous to this possibility, although well informed about it, because the current, in purpose flawed, booking process they keep using is convenient to them.

This is serious traveler safety issue and It would be interesting if some some NGO or even GO investigated how many people suffered, got in danger, got injured or died because of this practice worldwide.

Process needs to change and credit cards should be actually charged - NOT PRE-AUTHED - when host accepts. Then if something goes south the money would remain as booking credit you can use immediately for another booking.

At the very least a dialog should be added that warns you of the possibility of denial when u are trying to book a property that may refuse to host you resulting in your money getting frozen for weeks - but no; they don't want that. Instead they try to make it look like it is your fault: "You did not properly read our terms or service", etc. Typical corporate sheep herding.

Airbnb simply does not care - all they want is the money and their peace of mind and if some poor travelers die, well, poor people die every day.

Thursday, March 4, 2021

Have Outlook store mail data in a drive other than C:

As with many things Microsoft things that you would think are simple to do can turn out to be, perhaps unnecessarily, hard.

All I wanted was for Outlook to store its mail data (stored in .pst and .ost file) in E: drive instead of the default C: drive but for that, at least with the latest version of Outlook (2019) you actually need to edit the Registry.

Here is how:

Obviously, you can have it point to a full path and not just the root directory of a drive.

Source: https://www.datarepairtools.com/blog/move-offline-outlook-data-file-ost/

Thursday, November 26, 2020

VStarcam C90S surveillance camera won't connect to the WiFi

It is not mentioned anywhere but this particular model does not support the IEEE 802.11n protocol even with its firmware flashed to the latest version published by the manufacturer. You will need to force your router to 802.11g mode for it to be able to connect successfully and be accessible.

VStarcam C90S support link



Charge your motorized toothbrush with a wireless phone charger

In case you forgot to pack your motorized toothbrush charger, basically place your toothbrush, standing up, on a wireless phone charging pad or on your phone, if it supports reverse charging. 

https://www.pickr.com.au/qa/2019/yes-wireless-reverse-charging-can-charge-a-toothbrush/

NOTE: after testing this I can confirm that the wireless charger does charge the toothbrush but ONLY A LITTLE BIT regardless of the time you let it charge. I suppose the there are significant differences in the specification of the wireless charging interfaces of the two. Charge is barely enough for a single short brushing session.

Tuesday, October 27, 2020

Getting the right International travel COVID-19 certificate in Greece

There is a large number of private laboratories/clinics in Greece that do COVID-19 diagnostic testing on short notice and can provide a certificate with your results in English.

Regardless of the which country you are heading to the most important thing to remember is that the type of COVID-19 diagnostic test required in all cases is the PCR (Polymerase Chain Reaction) type of test, also known as, molecular test, nucleic acid amplification test (NAAT), RT-PCR test, or LAMP test. To be on the safe side though, make sure the certificate you receive refers to it as "PCR" or "RT-PCR" which is the name everyone will recognise and accept as valid.

Then, depending on which country you heading to, things can become more demanding. For instance, the airline employee at check-in or the immigration officials at the port of entry may require that you produce documentation or online evidence that the laboratory you did the testing at is officially certified/recognised for this type of testing by the Greek government. Given that the Greek government's sites are usually in Greek and pretty terse in quantity and quality of easily accessible information this could prove hard to do. I did do some research and thankfully there is official info online, in English, that can be used for that purpose.

The official Greek certification body for laboratories (including medical) has a minimal English version of its site here: esyd.gr

The site is the typical buggy, incomplete, non user friendly Greek public sector mess. It may take some time but eventually you will hit this page here (screenshot below) which allows you to get a listing of all medical labs certified to ISO 15189 standard.

The results are not necessarily labs that do COVID-19 PCR diagnostic testing and they are a mix of public and private entities. Using this listing you can find those labs that are listed under ISO 15189 certification for "human samples", like the one below, and which, in their "Scope of Accreditation" document, linked into their "Accreditation Details" page, list COVID-19 PCR testing as well.

If you already know of a lab that does COVID-19 PCR testing and want to check if it is officially certified then you can use this search form here.

Finally, for those able to read Greek there is a precompiled list of certified COVID-19 PCR diagnostic testing labs here.

Wednesday, October 14, 2020

Samsung T7 Touch 1TB External SSD Drive security mode's security is questionable

 I just purchased a 1TB Samsung T7 Touch External SSD Drive. Main reasons were:

  1. Its hardware based AES-256 encryption capability.
  2. Its USB 3.2 connectivity and claimed max read/write throughput of about 1 GB/s
  3. Its looks
Regarding point 1, the Windows software version that comes with the drive and enables its security mode is buggy. It cannot self-update to the latest version, or tell you if there is one (although it supposedly supports self-update) and although it does work, the drive would freeze, and with it the whole explorer.exe process, after a few hours of continuous use, e.g. while copying over many gigabytes, or having Google Backup and Sync sync those many gigs to Google Drive.

Obviously, like this, the drive would be useless for power users while its coveted security mode is on. Thankfully, the latest software version, which you have to seek out, locate, download and install yourself, does fix the problem; once installed it downloads and installs the latest firmware to the drive which makes the drive work as expected, i.e. it is stable in long term use while security mode is on.

The implementation of its security mode, however, does leave a few serious doubts to those who are security conscious and technically akin to cybersecurity. When I  switched from security to non-security mode and after I disconnected and reconnected the drive I noticed that my files, previously copied over with security mode on, were still accessible as normal. So, how were they encrypted then? Security mode was off and I was never asked for a password when I reconnected the drive, so... This implies the following grim fact: The AES-256 symmetric encryption key is always the same, but probably unique per drive, and potentially known/recorded by Samsung. The are some subcases here - some grimmer than other:

  1. The AES-256 key is hardcoded and therefore potentially fairly easily accessible via hardware/physical attack by a person with some electronics expertise. This would mean that turning on the security mode and supplying a password merely saves your password in a non volatile register (maybe hashed or maybe even in plaintext, though the latter would be unthinkable for a company like Samsung - more to be expected by Chinese companies of the worse kind), the host software compares the password you supply, on each drive connection event, to the one in the register and then either allows files to be decoded by the hardcoded key and appear as available or not. Security-wise, this is a pretty bad predicament.
  2. The AES-256 key is recorded in a non-volatile register, initially in plaintext, but once security mode is turned on, it is encrypted, using an undocumented algorithm, with the user password as key or part of the key, and then re-recorded in the same non-volatile register in encrypted form. When security mode is turned off it is re-recorded in its plaintext form and I remember that the software does ask you for your password when you turn off security mode. This is better but does not change the sobering facts that:
    1. Samsung potentially knows and records the AES-256 key for each drive it puts out in the market.
    2. We do not know how good the key encryption algorithm and overall implementation of the encryption/decryption process is.
Considering the points above, using password only (instead of password & fingerprint) as a more secure option may not be worth not taking advantage of the convenience of the fingerprint unlock feature although if implementation of point 2.2 is good, living with the fact that Samsung may have to disclose your drive's key if you are involved in a major FBI international investigation is not as bad as knowing that some fingerprint sensor fidgeting may unlock your drive.

Regarding point 2, a host computer with a USB 3.0 bus will only give you half the maximum read/write speed of the drive (around 400/500 MB/s); to get close to the maximum speed of 1GB/s you would need a host computer with a USB 3.2 bus.

Regarding point 3, the drive's looks are obviously great.


Finally, here is a tip from Samsung itself on how to improve the drive's performance on Windows hosts.




Wednesday, July 22, 2020

Office Add-In Caching is Problematic

Caching for Javascript based web add-ins for Microsoft Office is super problematic. Hard to make it let go of certain files and use new versions of them. Microsoft gives some instructions on how to clear the add-in cache here but it still won't work sometimes.

Especially problematic files are "FunctionFile.html" and "FunctionFile.js" if the Visual Studio naming convention is to be followed (i.e. how Visual Studio names these files in an auto-generated web add-in project). These files are not downloaded in the task pane's browser instance and therefore caching of them does not follow the same rules; they are extremely sticky and development can get pretty frustrating.

Only way I have found to deal with the problem is rename them in a versioning way whenever I effect changes on the files and want to see the results immediately. Specifically, assuming that the "Home.html" and "FunctionFile.html" naming convention is being used:
  1. In the add-in manifest rename "FunctionFile.html" and "Home.html" to "FunctionFile2.html" and "Home2.html", increasing that version number every time you need to refresh the cache.
  2. In "FunctionFile2.html" rename all instances of "FunctionFile.js" to "FunctionFile2.js"
  3. In "Home2.html" rename all instances of "Home.js" to "Home2.js"
  4. Rebuild & republish the solution if you're using the VS based automated process, or upload the changed files to the add-in backend if you're doing it manually.
  5. Go and manually (e.g. over ssh/sftp or in file explorer if doing it locally) rename the .js files to their new versioned names.
  6. Sideload the published xml manifest of the add-in to your Office app and take pleasure in the fact that your changes finally reflect immediately.
Microsoft has produced irritatingly problematic technologies before but I'm having difficulty remembering something as persistently problematic and as irritating as this. They keep throwing their dirty laundry at the developer.

Thursday, June 18, 2020

How to recover your Amazon account

Case 1: You are being asked to enter an OTP sent to your phone, although you don't have two step/factor authentication/verification, and you have lost access to your phone number or can't receive messages or voice calls where you are, e.g. extraordinary authentication that may occur when you are travelling to other countries where your phone is not working.

Solution: Solution assumes you still have access to the email address associated with your Amazon account. Go here and enter your email address. It will ask you to enter an OTP code that will be sent to your email. Check your email, get the code and enter it; you will then be given the opportunity to change your password AND if needed also the phone number (e.g. new local SIM card or other phone number that does work) associated with your Amazon account.

Case 2: You can still log in to your account but your account has been locked because Amazon thinks you may not be the actual owner of the account.

Solution: Go here and follow the instructions.

Thursday, May 28, 2020

ExecuteFunction won't work with non-button controls in Office Web Add-in manifests

Although  explicitly stated in official Microsoft Office web add-in docs that a function in FunctionFile.js may be called by both a button and a menu item control, it turns out that, at least with the latest Chrome based version of the Edge web control implementing the task pane, only button controls are actually able to invoke functions using the ExecuteFunction add-in manifest clause.

Saturday, April 11, 2020

Switch cameras while recording video on Android

Android, as of this post in April 2020, does not natively support flipping camera from back to front while recording a video. Some chat apps can do it though - Instagram and Snapchat for instance certainly WhatsApp and Skype during video calls. So, how do they do it?

Apparently they do it by screen grabbing a video preview they create in memory - the preview is much like what you see on your screen (minus the overlaid camera controls) when previewing and switching cams on your Android's native camera app. So they take that preview and either record it locally or transmit it to wherever the video is going online, e.g. an Instagram post or the person you are video chatting with.

But what if you want to do just that, i.e. create your own video while switching between cams on both sides of your phone, without being confined by the intricacies and limiting use cases of each of the aforementioned apps?

Well, all you have to do is kinda emulate what these apps do. A way to easily do that is:

  1. Get a good screen recorder Android app (it records a video of your phone screen being used). There's plenty of those on Play Store.
  2. Get an alternative Android cam app that allows all camera controls to be hidden. One good such app is "Open Camera" which is also available on the Play Store. Just use it's "Immersive Mode" to have the controls disappear after a couple of seconds of not using them.
Have fun!

Sunday, November 24, 2019

How to defeat Chrome CORB for XHR access to 127.0.0.1

How to defeat CORB (Cross-Origin Read Blocking) and allow javascript to access local web server running on localhost (127.0.0.1) over XHR:

  1. Select a random domain and point it to 127.0.0.1 in your HOSTS file
  2. Direct your XHR connections to that domain instead of 127.0.0.1
  3. You will need to enable SSL/TLS on your local web server.
    • If you are coding your own sockets server in C here is a guide on how to SSL enable them.
    • Or you can base your simple local server on a light web server that supports SSL/TLS out of the box: abyssws I chose this faster solution and had it serve files dynamically dumped out by my existing logic to specific doc paths under the server's root.
  4. You will need to make sure that your local server's responses always include this CORS header: Access-Control-Allow-Origin: *

It should be working now.

Tuesday, September 24, 2019

How to sniff packets in a WiFi network

In wired Ethernet LANs sniffing packets meant for other computers in the network, if on a Linux based system, is as simple as setting your local network interface to promiscuous mode and running tcpdump.

WiFi complicates things as each computer connected to the hotspot holds a wireless WPA session encrypted to a different session key and most hotspots (at least today) only send Ethernet frames meant for a specific MAC address over the specific session mapped to the device to which that MAC address belongs.

Therefore, one is left with at least three possible ways to do promiscuous sniffing on a WiFi network:

  1. MAC spoofing. The MAC address of a Linux box can be easily spoofed using standard utilities like ifconfig but there are also specialized utilities like macchange. MAC spoofing is very fragile and timing prone and although you can hijack a few packets using it you run a high risk of killing the Internet connection of the target device you are spoofing.
  2. Running a rogue (secondary) DHCP server on your Linux box (easily installed and configured on a Linux box) and then performing a DHCP poisoning exploit on the legitimate DHCP server using an easily available and installable utility like yersinia. Doing this you eventually end up with the all of the local network's devices registering with the DHCP server under your control and this way you get to tell them which DNS server and Internet gateway to use. If all you want to do is monitor their DNS requests so you know what sites/services they use, you can simply tell them to use your local BIND instance (which must have query logging turned on) as their DNS server. However, some devices may have their DNS servers hardcoded or you may want to intercept the communication packet themselves; in this case you simply need to set the gateway to your own IP address (which still has as gateway the legit gateway) and turn on packet forwarding like this: sysctl -w net.ipv4.ip_forward=1 After that, using tcpdump and filtering for the IP address of the target device will give you access to the full packet stream to/from that device.
  3. There is an easier way to have the exact same results as with method 2 right above. You can use the arpspoof utility (easily installable by installing the dsniff package) to pretend you are the gateway. While arpspoof is ARP spoofing the target machine will send you its packets thinking you are the gateway; you need to forward them by using the same command as above: sysctl -w net.ipv4.ip_forward=1 Now you also have access to the target device's packet stream. This method also bears some risk of breaking the Internet connection of the target device, so it's best to keep your spoofing as short and targeted as possible.
Methods 2 and 3 are versions of a gateway MITM (Man In The Middle) attack.

Next chapter: SSL/TLS MITM attacks. Privacy goes bye-bye.

Thursday, August 1, 2019

Best way to show/hide HTML elements without losing styling

There are basically three ways to do that:

  • element.style.visibility=hidden/visible works well when it comes to preserving styling but only hides the element while rendering it under the the hood. The element still takes up space in the page layout as if it was there (and it is there just that it does not show).
  • element.style.display=none/inline/block/initial works well in truly making the element disappear; the element does not show at all and it does not take any space in the page layout (as if it was not there at all). However, it will mess up (not preserve) the styling of certain elements, especially when complex CSS is involved.
  • element.hidden="true"/element.removeAttribute("hidden") works great, combining the true hiding of the latter with the styling preservation of the former. It is only supported in fairly new versions of browsers though as it was introduced with HTML5.

id and name attributes with underscores not working well for Bootstrap form elements

I came under a weird situation in laravel/bootstrap form whereby a select drop-down's  "select-element.value" in Javascript would remain the same (the very first one) regardless of which option was actually selected.

Turns out the error went away once I renamed the id and name attributes of the select element to a string without an underscore ('_') in it. I looked it up and although theoretically allowed and mostly non-problematic, underscores have a history of issues in id and other element attribute names under different situations and environments and they are therefore not recommended in guides like this one: https://google.github.io/styleguide/htmlcssguide.html#ID_and_Class_Name_Delimiters

Thursday, July 18, 2019

JavaScript substring replace with RegEx and backreferences

I wanted to find all substrings matching a pattern, extract certain parts of those substrings, use those substrings of substrings to build new strings and finally replace the matched substrings with those new strings.

Specifically, using pure JavaScript, I wanted to scan a long string containing HTML, find all strings like:
src="/project/5cba4b052195310084a3c394/file/5cdc5e59a1fefc007cd21b51"
to:
http://somedomain.com/user_files/5cba4b052195310084a3c394_5cdc5e59a1fefc007cd21b51
Basically, match all strings like the top one, extract the two substrings of interest (in red) and then combine them into a new string that should replace the originally matched string.

I used JavaScript RegEx processing with backreferences marking the substrings in red and it works pretty well. Check out the simple and efficient code here: https://jsfiddle.net/alexfotios/o6wt4d2p/

Wednesday, July 17, 2019

ERROR 1064 (42000) in MySQL

Tried to import a sql script that was the product of forward engineering of an EER diagram done in MySQL Workbench (I had not modified it at all) but I was getting a persistent "ERROR 1064 (42000)" although it all seemed to be in order.

This is a pretty generic error that can occur in a number of different situations but in my case it turns out it was due to an empty table, i.e. a table defined in the schema but having no rows at all, including a Primary Key (PK) column. Once I defined that the error went away.

Sunday, February 24, 2019

A typical Upwork bid

Just a small window to my IT Freelance world. Here is the bid I just a submitted for an Upwork published job I was invited to. I receive 2-5 such invitations every day to projects ranging from white hat hacking to Microsoft Office add-ins.

Hello, thank you for the invitation! I have developed a couple of systems that do scraping. The way I went about it is headless browser instances. Main reason for that was that anyone who wants to thwart scraping of their pages would implement something that works in a browser but does not work in something like a CURL based request; a typical example is dynamically built HTML page content using javascript vs the typical static HTML still prevalent on many websites (but diminishing). The core idea here is that if your scraping is using scripted actual browser instances instead of a bot that performs HTTP requests then you have much less to worry about. So, what I did is I created a Java based manager that launches up to X concurrent headless instances of FireFox and drives them to dynamically and concurrently load pages stored in a MySQL via PHP scripts (the user interface). A special scraping javascript is injected in all pages by a custom Firefox extension - the script is customizable and can look for a number of things (elements/data) in each page loaded depending on the domain and a host of other customizable/programmable factors. It then makes XHR calls to a local PHP script that stores the desired extracted information in whatever format is needed (JSON, tabular in DB, Excel, plain text, etc.) It all runs on Linux. I would be happy to modify this system to your spec - I think it will work well and it will be a better long term investment than a typical PHP/CURL based scraper. I can do it for a fixed price of 3K USD split in 3 well defined milestones with demonstrable/working deliverables each. Time for complete system delivery working to your spec would be about 3 weeks. Looking forward to it! Alex

Monday, September 17, 2018

How to bid on a Reverse Engineering project and what tools to use

Hi,

I have significant experience in low-level Windows development, including driver development (kernel mode), cracking and reverse engineering. I use the most advanced tools of the trade including IDA Pro, OllyDbg, WinDbg and other Windows SDK/WDK tools, Windows SysInternals utilities, and others as needed.

If you are looking to simply decompile a single exe file into C source code I can do that for you for 500 USD. However, it needs to be said that the produced code, though accurate, will not be very readable as a compiled program does not retain identifier names (like variable and function names) that usually convey most of the meaning in source code; still, the code's logic is usually fully and correctly retained.

Also, the code won't be much more than a long monolithic list of statements that is usually not directly compilable into the same application whose decompilation produced it.

Therefore, in most cases, such projects involve a specific function (or set of functions) that need to be decompiled AND converted to meaningful source code that can then be compiled into a new and fully working application. The process of doing the latter usually involves debugging the app to see which function/functions are being called and when and then extracting the decompiled code of those particular functions, rewriting it, in order to become comprehensible, and then combining it with other code into a new project structure (could be a Visual Studio project) that can then be compiled into a new fully working app.

If what you want is what I described in the last paragraph then I can do that as well and the cost for each function/functionality depends on the function/functionality itself and its complexity. Specific quotation for this scenario will be possible after a first full decompilation of the app is performed.

Cheers,