SimulPiscator / AirSane

Publish SANE scanners to MacOS, Android, and Windows via Apple AirScan.
GNU General Public License v3.0
256 stars 26 forks source link

Rs should be by scanner #68

Closed bastien-roucaries closed 2 years ago

bastien-roucaries commented 3 years ago

Here rs should be by scanner:

https://github.com/SimulPiscator/AirSane/blob/6919551b255196cbe839b9d3586031ee0050c4b4/server/mainserver.cpp#L293

moreover in order to defect brute force https? scanning I will do if supported by client something less predictable, and that does do not leak where the scanner is connected.

I will use therefore as rs something like PBKDF2 it does not need to be super secure, but at least brute force attempt will fail.

In all the case the rs should not be linked to scanner topography

bastien-roucaries commented 3 years ago

Note that even if it is insecure you should salt by scanner and using basic cryptographic quality salt (\dev\urandom)

bastien-roucaries commented 3 years ago

It should be changed here also https://github.com/SimulPiscator/AirSane/blob/master/server/scannerserver.cpp#L80

SimulPiscator commented 3 years ago

Having one port per scanner, and using "eSCL" as the scanner's path is necessary to make some clients work. It is not described/prescribed in the standard, though.

bastien-roucaries commented 3 years ago

@SimulPiscator does the client that fail are open source ? If so they should be fixed.

standard say eSCL is the default but client must read rs

SimulPiscator commented 3 years ago

standard say eSCL is the default but client must read rs

I know, but the Mopria app and Vuescan don't adhere (or at least didn't)

bastien-roucaries commented 3 years ago

BTW if rs could include / it will be better to do uidbydefaultmadefromrandom/reproductiblehashofscanner

bastien-roucaries commented 3 years ago

Do you have Mopria and vuescan bug mail report ?

bastien-roucaries commented 3 years ago

uidbydefaultmadefromrandom could be overrided by admin and therefore admin could use reproductible path to scanner

bastien-roucaries commented 3 years ago

@SimulPiscator If you could confirm that mopria and Vuescan do not adhere (recent version) I will open CVE and report security bug on their side.

SimulPiscator commented 3 years ago

OK, the current version of mopria is able to correctly resolve rs and does detect scanners. VueScan does not, but it's closed software. I submitted a bug report nevertheless.

SimulPiscator commented 3 years ago

I have a hard time making sense of randomized paths to scanners. In the end, they must be known in the local network so clients can connect to them. An attacker in the local network will thus know them as well. Attacks from outside the local network will not be possible if AirSane listens on a local address. If AirSane is exposed to the internet (for whatever reason), the scanner path must be predictable, otherwise a remote client cannot know it across AirSane restarts.

bastien-roucaries commented 3 years ago

@SimulPiscator Could you send me a private mail with a pub key to my debian address ? I will explain you

SimulPiscator commented 3 years ago

I tried to send you a message that, according to AppleMail documentation, should contain a public key, enabling you to send an encrypted message to my real name email address. Seems not to have worked, what can I do?

bastien-roucaries commented 3 years ago

@SimulPiscator no nothing

SimulPiscator commented 3 years ago

There is now an option to prepend a randomly chosen uuid to all scanner paths. I also assume that you are suggesting to mDNS-publish scanners as _uscans (rather than _uscan) if a unix socket name is given. Is that right?

bastien-roucaries commented 3 years ago

Le jeudi 26 août 2021, 17:52:03 UTC SimulPiscator a écrit :

There is now an option to prepend a randomly chosen uuid to all scanner paths. I also assume that you are suggesting to mDNS-publish scanners as _uscans (rather than _uscan) if a unix socket name is given. Is that right? Yes by default but add a flag to reverse to _uscan if needed for debug purpose

Thanks

Bastien

SimulPiscator commented 3 years ago

There is now an "advertise-secure" option which is independent of the "unix-socket" option, just to keep the options orthogonal, making them easier to handle.

SimulPiscator commented 3 years ago

I added some example configuration files to a new "https" directory, and added a https README in the main directory. I would appreciate to know your opinion.

bastien-roucaries commented 3 years ago

Le mercredi 15 septembre 2021, 17:48:05 UTC SimulPiscator a écrit :

I added some example configuration files to a new "https" directory, and added a https README in the main directory. I would appreciate to know your opinion. ok with me maybe ate end mention letencrypt