Code Monkey home page Code Monkey logo

lorawan-fota-signing-tool's People

Contributors

janjongboom avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lorawan-fota-signing-tool's Issues

Potential replay attack on updates

Hi! I've been studying your FUOTA mechanism from the security perspective and first of all thanks for the hard work!

For what I understood, what's sent to the device is the binary update (full binary or diff) plus a manifest, and the manifest contains:

  • Signature length + Signature
  • manufacturerUUID, deviceClassUUID,
  • versionBuffer: derived from a timestamp
  • isDiffBuffer: seems to be a bool

Since the versionBuffer field in the manifest is not signed, it makes the FUOTA mechanism susceptible to replay attacks. This is, an attacker that previously sniffed a FUOTA is able to replay it, which can lead into a software downgrade.

Maybe the simplest approach to get around this problem is to use incremental versions and sign the version field as well? Let me know your thoughts, thanks.

Error generating keypair

I need to create a public/private key pair using Node.js 8. I have installed lorawan-fuota-signing-tool and gave the command "lorawan-fota-signing-tool create-keypair -d example.com -m awesome-2000" to generate keypair. An error occured as in the attachment and no files are generated in the folder .fota-keys. When I try further to generate keypair, error is displayed that overwriting of existing certificates is not possible.
image

I would also like to confirm if the domain name and device model name are specific or can be given by the user. I have given them as example.com and awesome-2000 currently.

When I use encode_file.py to create fragments, the fragments is cannot restructed.

Hi,
I think there is a problem in encode_file.py from line 109 as follows:

    first=1
    for k in range(data_row_count):
      if(templine[k]==1):
        if(first==1):
          for m in range(fragment_size):
            data_rows[i][m] = data_rows[k][m]
          first = 0
        else:
          for m in range(fragment_size):
            data_rows[i][m] = data_rows[i][m] ^ data_rows[k][m]

It may be modified as follows:

    for k in range(data_row_count):
      if(templine[k]==1):
          for m in range(fragment_size):
            data_rows[i][m] = data_rows[i][m] ^ data_rows[k][m]

If you disgree with it, could you tell me the reason.

sign-delta fails on windows

Could not open first file \root\C:\path\to\update.bin

Looks like the "\root" in front of C: is causing an issue on windows

apply_delta_update fails on unexpected patch file data

This failure happens when applying the delta update

Expected ESC but got EF
Positions are, source=0 patch=1 new=0
[WARN][LWUC]: apply_delta_update failed 1_

I've tracked down the issue to bad format of the diff returned by the fota-lorawan-signing-tool.
Looking at the implementation, the diff is in the stdout returned by spawnSync(jdiff.js) and for some reason it's not correct; However, when the jdiff command is run with the outfile option set, the diff in the outfile is correct.

I changed the tool to pass jdiff an outfile, and to get the diff from the file. With this change, delta updates are now working for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.