Breaking a Proprietary Chinese Encryption Protocol - Hacking the VStarcam CB73 Security Camera

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ย. 2024
  • Check out the blog about the VStarcam custom encryption:
    brownfinesecur...
    github repo:
    github.com/Bro...
    Need IoT pentesting or reverse engineering services?
    Please consider Brown Fine Security:
    brownfinesecur...
    IoT Hackers Hangout Community Discord Invite:
    / discord
    🛠️ Stuff I Use 🛠️
    🪛 Tools:
    Raspberry PI Pico: amzn.to/3XVMS3K
    XGecu Universal Programmer: amzn.to/4dIhNWy
    Multimeter: amzn.to/4b9cUUG
    Power Supply: amzn.to/3QBNSpb
    Oscilloscope: amzn.to/3UzoAZM
    Logic Analyzer: amzn.to/4a9IfFu
    USB UART Adapter: amzn.to/4dSbmjB
    iFixit Toolkit: amzn.to/44tTjMB
    🫠 Soldering & Hot Air Rework Tools:
    Soldering Station: amzn.to/4dygJEv
    Microsoldering Pencil: amzn.to/4dxPHwY
    Microsoldering Tips: amzn.to/3QyKhrT
    Rework Station: amzn.to/3JOPV5x
    Air Extraction: amzn.to/3QB28yx
    🔬 Microscope Setup:
    Microscope: amzn.to/4abMMao
    Microscope 0.7X Lens: amzn.to/3wrV1S8
    Microscope LED Ring Light: amzn.to/4btqiTm
    Microscope Camera: amzn.to/3QXSXsb
    About Me:
    My name is Matt Brown and I'm an Hardware Security Researcher and Bug Bounty Hunter. This channel is a place where I share my knowledge and experience finding vulnerabilities in IoT systems.
    - Soli Deo Gloria
    💻 Social:
    website: brownfinesecur...
    twitter: / nmatt0
    linkedin: / mattbrwn
    github: github.com/nma...
    #hacking #iot #cybersecurity

ความคิดเห็น • 263

  • @balintmecsei6162
    @balintmecsei6162 หลายเดือนก่อน +132

    I've managed to deobfuscate the original function. I was thinking about copy pasting it into the comments, but I rather made a pull request to the repo.

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +46

      wow thanks! this is awesome and now makes a ton of sense. I'm going to try to dig around in my device to find the key string that my stuff uses.

    • @John_Reid
      @John_Reid หลายเดือนก่อน

      Splendid

    • @p0fs
      @p0fs หลายเดือนก่อน +10

      @@mattbrwn it is "vstarcam2019" in your case, but could also be "vstarcam2018" or none for other DeviceId prefixes (earlier models?)
      And the resulting seed should be *2d d3 61 07*

    • @pgvee3317
      @pgvee3317 หลายเดือนก่อน +4

      Added on to your pull request to flesh out the decompiled ghidra output.

    • @optimiserlenergie1094
      @optimiserlenergie1094 หลายเดือนก่อน +3

      How did you deobfuscate the function ? Thanks

  • @omarhadeed1365
    @omarhadeed1365 หลายเดือนก่อน +77

    DEF CON 33 audience will be cheering!!

  • @KennethLongcrier
    @KennethLongcrier หลายเดือนก่อน +94

    As a developer, I'm more looking for words like "Industry Standard" and "Peer reviewed"

    • @UNcommonSenseAUS
      @UNcommonSenseAUS หลายเดือนก่อน +12

      Peer review is an acadamia scam, which itself is now naught but a mlm scam

    • @TheConstitutionalGuardian
      @TheConstitutionalGuardian 17 วันที่ผ่านมา +2

      @@UNcommonSenseAUS Where I work... peer review is, we are going to pay you $150k a yr, but we would like to check your work!

    • @coreym2336
      @coreym2336 8 วันที่ผ่านมา +1

      Agreed. I have more (not 100%) trust in an open source encryption standard where you can read the code but when I compile and use it, you can't break in (or have a life shortening level of frustration to do so).

    • @lunchbox1553
      @lunchbox1553 4 วันที่ผ่านมา

      ​@@TheConstitutionalGuardian It's not about trusting the engineer, it's about trusting them with the security and stability of the entire company. However, just like all humans, engineers make mistakes no matter how much they get paid.

    • @eIicit
      @eIicit 4 วันที่ผ่านมา

      It’s NIST or nothing

  • @HollyTroll
    @HollyTroll หลายเดือนก่อน +50

    80% of this video is flying over my head but im here because i can relate very much with your excitement! great work

    • @RyckmanApps
      @RyckmanApps 19 วันที่ผ่านมา +3

      I’m this guy

    • @SyedJesus
      @SyedJesus 10 วันที่ผ่านมา +2

      80%? Pffft.. I'm at 95%..

  • @steingat
    @steingat หลายเดือนก่อน +229

    The Encryption being broken is a feature not a bug

    • @rnts08
      @rnts08 หลายเดือนก่อน +46

      Ccp approved "encryption". 🎉

    • @davel202
      @davel202 หลายเดือนก่อน +9

      Pretty much the case with any camera system. The most “secure” facility camera networks, portable DVR systems, etc all have default management passwords and stuff like that.

    • @Crux161
      @Crux161 หลายเดือนก่อน

      @@davel202that’s certainly not always the case. Bad opsec is bad opsec, not everyone is so incompetent. I’ve gotten enough camera systems from alibaba to know they don’t all just have default passwords etc

    • @LennyMiller739
      @LennyMiller739 หลายเดือนก่อน +4

      ​@@davel202What are you talking about? Default credentials are neither feature or bug. They're supposed to be changed. That's a faulty USER

    • @davel202
      @davel202 หลายเดือนก่อน

      @@LennyMiller739 the credentials I’m taking about are not offered to the purchasing agency or organization. Not documented in administration manuals or installation guides. If you’re the administrator for an organization with a Linux based DVR, installed on premises as an appliance, with a management contract then the party responsible for securing that is arguably all parties. In this hypothetical you wouldn’t expect the company that sold you the device and service contract to use the same passwords across an entire government fleet or to have hidden recovery tools like a RAT. If you look at these devices you’ll understand why there is a parallel here. Another example: network enabled cameras from a Korean company offering white label products to American contractors attempts to reach out to home and other places based on a calculation of time and production date or number of boot cycles making the event irregular. Yes you can detect the server opening ports using inventory and monitoring. What about when that device is in a police car and opportunistically connects to open wifi networks or any BSSID from a certain company?

  • @khx73
    @khx73 หลายเดือนก่อน +113

    No doubt the jpg snapshot sent to the cloud is for thumbnails to show in your app, or something similar. But I imagine somewhere in CN there is a massive video wall with access to millions of "secure cameras" 😀

    • @stevesteve8098
      @stevesteve8098 หลายเดือนก่อน

      it's far worse than that.,....
      any images with faces are geo-located and used to populate /cross-reference a facial recognition system.
      They are also building a DNA database of anyone they can get the DNA from... currently that is EVERY male in China ,but recently that is also any Chinese company with a foreign office capable of DNA processing.
      They also have local government oragans loading malware onto every business computer in a specific areas... under the "guise" of processing tax software for business.
      this is only a very very small part of a much bigger picture.
      You better hope that phone he is using a burner.
      But really he needs to get his head examined.... becasue he is helping them secure very dangerous products and putting himself on all sorts of lists.

    • @ivanocj
      @ivanocj หลายเดือนก่อน

      This thing happens since 2013 at least... Search for cs2-network and paul Marrapese.

    • @UNcommonSenseAUS
      @UNcommonSenseAUS หลายเดือนก่อน +8

      No need to imagine...

    • @MrTehkaiser
      @MrTehkaiser 15 วันที่ผ่านมา +1

      ​@@UNcommonSenseAUS okay. Show us exactly what he's referring to.

    • @himebito
      @himebito 11 วันที่ผ่านมา +7

      ​​@@MrTehkaiser china literally has millions of cameras, it is the country with the single most surveillance cameras in the world and its not even remotely close. this is literally public information.

  • @SanityIT
    @SanityIT หลายเดือนก่อน +40

    Matt: "I certainly do not trust this Chinese device".
    China: "We certainly cant trust this Matt guy exploiting our devices".

    • @eIicit
      @eIicit 4 วันที่ผ่านมา

      How else do we move security forward? The only problem was publicizing it since it’s a Chinese company. 🤐

  • @izzyortiz8098
    @izzyortiz8098 หลายเดือนก่อน +9

    Such an underrated channel... Fun and educational at the same time, great work, Matt!

  • @LMABeste
    @LMABeste หลายเดือนก่อน +21

    I think what you call SEED is actually just the key. It is computed once initially by the portion of the decryption function that you skipped, and then for each byte of ciphertext:
    1. 1 of the key's 4 bytes is selected based on the lower two bits of the previous ciphertext value: *(byte *)(SEED + (PREV & 3)) // remember that SEED here is a pointer
    2. The previous byte of ciphertext is added to this byte, and the result is truncated to 8 bits
    3. The result of this is used to index the table / S-Box.
    So the only reason why you even had to go to the effort of brute-forcing the seed is because you had the lookup function wrong - it's really just a 32-bit key generated with zero entropy.

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +8

      Yeah this makes sense. The "seed" being a pointer is the big part I wasn't fully grasping.

    • @ChrisHillASMR
      @ChrisHillASMR 12 วันที่ผ่านมา

      Then why make a video if you dont understand the basic function when its spelled out in front of you? Are you trying to be informative or just content dropping for money?

    • @sterlingzubel6752
      @sterlingzubel6752 8 วันที่ผ่านมา +20

      @@ChrisHillASMR why are you mad? He didn't get it perfect, which is fine. He found a work around, which was to brute force it. Brute forcing a 256 byte key is absolutely not hard for a pc to do. The fact that there are workarounds proves that this is even less secure. If someone steals your identity, it doesn't matter if they did it the "perfect way", you're effected the same. Its okay to accomplish something and someone offer advice, and it's okay to ask for help.

    • @NuViss
      @NuViss 2 วันที่ผ่านมา

      *(byte *)(SEED + (PREV & 3))

    • @LittleRainGames
      @LittleRainGames วันที่ผ่านมา

      ​@@ChrisHillASMR I smell something. Jelousy? Maybe stick to ASMR .

  • @danielcollin4012
    @danielcollin4012 หลายเดือนก่อน +9

    Great video! What I would personally do is not only looking at the decompiled code and look the disassembly as well as Ghidra gets confused now and then which may (or may not) explain some of the unknown code.

  • @bambapappa
    @bambapappa หลายเดือนก่อน +5

    Impressive and so out of my area of expertise but so glad you guys exist and do this stuff for the benifit of the rest of us. Now only edit the findings together with some scary pictures, add some music and a David Attenborough voice over and its ready for the documentary secion of any stresming service

  • @mikehibbett3301
    @mikehibbett3301 หลายเดือนก่อน +12

    When I first started working on embedded systems with encryption requirements (1989) I did just that. The device was still in use 20 years later, by which time I was supremely embarrassed. Can't mention the product because it was military.

    • @kaydog890
      @kaydog890 หลายเดือนก่อน +1

      When ?

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +2

      I made that mistake when I was 14 yo and had just started the career, it was just a POS POS (piece of shit point of sale) app.

    • @UNcommonSenseAUS
      @UNcommonSenseAUS หลายเดือนก่อน

      Ruh roh

  • @nezu_cc
    @nezu_cc หลายเดือนก่อน +22

    The mystery function is a hash function, it takes in and arbitrary length key (first parameter) and produces a 4 byte hash. Not sure what hash function this is, but the idea is the same as with something like PBKDF but jusy infinitely less secure.
    Edit: the reason why you only have 4 possible "seeds" is because the hash is only 4 bytes long. The hash, or as you called it "seed" is infact the main decryption key, derived from a string passed in the first argument.

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +5

      the first argument is the key, its just the world's worst key derivation algorithm

    • @Aera223
      @Aera223 27 วันที่ผ่านมา +2

      4 bytes = 2^32 combinations of bits, 4 billion. Crackable within the hour (I tested cracking crc32 hashes)

    • @Aera223
      @Aera223 27 วันที่ผ่านมา +2

      Update: watched more of the video and found out I was wrong, 4 seeds discovered
      Edit: TH-cam approved the comments after a handful of minutes.

  • @scottstempmail9045
    @scottstempmail9045 7 วันที่ผ่านมา +4

    Imagine flooding the market with these devices solely to provide cover for your agent's clandestine communications with the home country.

  • @adamarzo559
    @adamarzo559 หลายเดือนก่อน +27

    You definitely should have had that camera sending pictures back to China while you were dismantling their amazing proprietary code. Doubt they look at the pics, but a hilarious thought none the less.

    • @dr.hinneredv932
      @dr.hinneredv932 หลายเดือนก่อน +1

      hehe

    • @TheConstitutionalGuardian
      @TheConstitutionalGuardian 17 วันที่ผ่านมา

      We haz you camera!

    • @eliotmansfield
      @eliotmansfield 16 วันที่ผ่านมา +5

      send back a photo of winnie the pooh - should be appreciated I hear.

    • @eIicit
      @eIicit 4 วันที่ผ่านมา

      Aimed the camera right at his screen

  • @ME-L3U
    @ME-L3U หลายเดือนก่อน +7

    Matt I would like to say that you are inspiring me to invest more into binary reverse engineering, Thank you.

  • @rdxdt
    @rdxdt หลายเดือนก่อน +33

    Proprietary encryption: xor cipher

    • @gryzman
      @gryzman หลายเดือนก่อน +8

      pssst, virtually every encryption - streaming cipher wise - ends in a xor operation ;)

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +2

      @@gryzman yep, those are called S-Boxes, what makes things like AES secure is the possible amount of paths that can be created between the input bits, the key, the S-box, and the output, this algorithm is very weak because it has only one box, not 512 ones, and it runs the "Rotor" for only 1 cycle.

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +3

      that thing someone called "proprietary encryption" was basically Caesars substitution cypher, its the dumbest encryption for ever, when I was 7 yo I "created" it and called it "P-code", because the key started with ` seed = 'P' ` , then for each byte it was the Next = Table[Prev XOR Key]

    • @microcolonel
      @microcolonel 7 วันที่ผ่านมา

      ​@@monad_tcpthat's not what S-Box is...

  • @Crux161
    @Crux161 หลายเดือนก่อน +4

    This guy looks a lot better _without a hat_ but the content is always pure gold regardless

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +12

      I'll wear a hat next time just for you

    • @Memer-ish-w7q
      @Memer-ish-w7q หลายเดือนก่อน

      @@mattbrwn lol

    • @halfsourlizard9319
      @halfsourlizard9319 19 วันที่ผ่านมา

      ​@@mattbrwnWinning

  • @arghyl
    @arghyl หลายเดือนก่อน +5

    This is an excellent series to follow.

  • @zapjunkie
    @zapjunkie หลายเดือนก่อน +3

    This camera series was awesome. Loved it.

  • @novelhawk
    @novelhawk หลายเดือนก่อน +13

    I think SEED is some kind of struct that has 4 fields or it's even easier if you consider it an array. You didn't show the SUB41/CONCAT functions but I'm assuming they are some sort of deterministic way to create a seed based on a key (the key being the first parameter, param_1, which ironically is used only for a single character [the last one or the 21st, whichever comes first]).
    The reason it's passed as a pointer is because they do pointer aritmetics to get to one of the 4 fields depending on the last 2 bits of the previous character. The math it does looks strange due to compiler optimizations/ghidra having problems to decompile it, if you interpret SEED as an unsigned char array of size 4 it would look like this:
    TableIndex = (prev_character + SEED[previous_character & 3]) % 255
    Key = P2P_Table[TableIndex]

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +3

      Those SUB and CONCAT functions are Ghidra "built-in" functions that don't have any direct C equivalents.
      I think you might be right about seed being some kind of struct.

  • @eIicit
    @eIicit 4 วันที่ผ่านมา +1

    Awesome work. You are extremely efficient. If you spent a week in that function, I’d have to spend a year in it.

  • @spiotrowicz33
    @spiotrowicz33 11 วันที่ผ่านมา +1

    So cool that you can figure that out and write python to decrypt... Great video.

  • @danialothman
    @danialothman หลายเดือนก่อน +32

    VStarcam: Matt, STAAAHP!

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน

      stop its already dead

  • @protonjinx
    @protonjinx หลายเดือนก่อน +9

    What you want in encryption is "known implementation but still secure". If you cant break it even if you know how it works....

  • @RandyFortier
    @RandyFortier หลายเดือนก่อน +14

    Basically, a one time pad being used more than one time. One of the two classic blunders!

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +2

      its a Caesars substitution cypher, classic !

    • @RandyFortier
      @RandyFortier หลายเดือนก่อน +1

      ​@@monad_tcp I don't think so. It seems to be that the cipher is really just XOR. The key is derived using some weird math, but is about as simple as it gets in the cipher.

    • @andrewferguson6901
      @andrewferguson6901 หลายเดือนก่อน

      ​@RandyFortier any same length encryption is reducing to xor?

    • @RandyFortier
      @RandyFortier หลายเดือนก่อน

      @@andrewferguson6901 Just check out the code screenshot, on the blog post.

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน

      @@RandyFortier its both, the XOR is used for block cipher to glue blocks (otherwise it would be just XOR cipher), and there's a substitution table similar to Vignhere, I call all those shit cryptography Ceasars substitution chiper, because they're all just sliding the characters by some arbitrary index. But I don't think whotever wrote this knew what they were doing.
      Its basically a bit better than mere Caesars because it does Next = Table[Prev XOR Key]
      Either way, that thing doesn't survive a frequency analysis and you can even automate breaking it.

  • @MikeButash
    @MikeButash หลายเดือนก่อน +20

    I have to imagine all these chinese companies register their "encryption" with the government to include pre-built decoder filters in the transport infrastructure at local ISP that if/when they want, they simply replay whatever they want from anyone that crosses the great firewall.

    • @UNcommonSenseAUS
      @UNcommonSenseAUS หลายเดือนก่อน

      Chinese companies is right, if it's a company in China it's literally beholden at every level to the ccp

  • @minirop
    @minirop หลายเดือนก่อน +6

    funny that it works anyway, because looking at the ghidra decomp, it shouldn't be "seed + (prev & 3)" but "seed[prev & 3]" that shows how secure is it.
    my guess about the code that you couldn't understand is that it encodes the 4 seed bytes into an int32 or that seed is of type byte[4]. (with some shenanigans based on the first parameter)

    • @monad_tcp
      @monad_tcp หลายเดือนก่อน +1

      particularly I prefer __ (prev & 3)[seed] __

  • @HenryWu-rc5gw
    @HenryWu-rc5gw หลายเดือนก่อน +3

    Decompiler (e.g. Ghidra) can't be fully trusted because compilation is a process which may drop part of high-level info which is necessary to recover original source code. Ability to read assembly code is very helpful to security researchers in that they may come across obfuscated code, boot loader, hand-written assembly, etc. Ghidra is a highly advanced tool which can speed up reverse engineering but it can't replace human reverse engineer.
    PS: This encryption is weak...

  • @ilSySTeMli
    @ilSySTeMli หลายเดือนก่อน +3

    Awesome work Matt ,I've been looking into cam FWs my self and found some interesting stuff (like some sort of cyrpto miner on a V380 cam) ,but if I had your programing skills I'd rather make DeClouded FWs for these Kind of Spyware so people can buy cheap stuff and use them safely in there HA projects ,instead of E-Wasting a ton of potential (I bet it would help the Channel a LOT as there are lots of people trying to do so)

    • @UNcommonSenseAUS
      @UNcommonSenseAUS หลายเดือนก่อน

      There'd just be different e-waste & to think that every government isn't actively doing this is foolish. Privacy is dead has been since 9.11.01

    • @laulaja-7186
      @laulaja-7186 3 วันที่ผ่านมา +2

      DeClouded. There’s a word we need to hear a lot more often.

    • @ilSySTeMli
      @ilSySTeMli 3 วันที่ผ่านมา

      @@UNcommonSenseAUS Personally I don't see repurposed electronics as waste, I'd rather have a 480p potato vision camera monitoring my boiler room then not having one ... Though that's my opinion only.

  • @VA_Grown
    @VA_Grown หลายเดือนก่อน +2

    All this made me realize that I need to build my own damned security cams. Thank you for all you're doing

    • @laulaja-7186
      @laulaja-7186 3 วันที่ผ่านมา

      DeClouded firmwares. The world OSS community needs to do a lot more of these, I am thinking.

  • @simonstergaard
    @simonstergaard หลายเดือนก่อน +1

    Im learning something everytime you post. Thankyou!

  • @RozanaJob
    @RozanaJob หลายเดือนก่อน +3

    the wireshark light theme frying my eyes out

  • @rothn2
    @rothn2 29 วันที่ผ่านมา +1

    Mmm, pickled seeds. That actually might taste good with pumpkin seeds!

  • @H33t3Speaks
    @H33t3Speaks หลายเดือนก่อน +1

    Encrypting a data stream with a non-encrypted key.
    "That's a bold strategy Cotton, let's see how it works!"
    -- Dodgeball

  • @florianl14
    @florianl14 หลายเดือนก่อน +1

    You are some high end professional hacker,

  • @WWFYMN
    @WWFYMN หลายเดือนก่อน +9

    can you do an episode about installing custom firmware on it?

    • @BlueJDev
      @BlueJDev หลายเดือนก่อน

      Or just altering the software to skip the ccp servers and send to our own...

  • @nuradioconcepts
    @nuradioconcepts หลายเดือนก่อน +2

    Love these videos! I know you don’t claim to be an RF expert, have you ever thought about reverse engineering a cellular PiHat? I would love to see the results

  • @SHBBZL
    @SHBBZL หลายเดือนก่อน +6

    I think this is the pseudo-code for that part:
    int j = 0;
    while ( j < strlen(param1) && j != 21 )
    {
    v10 = param1[j++];
    LOBYTE(seed[0]) += v10;
    BYTE1(seed[0]) -= v10;
    BYTE2(seed[0]) += v10 / 3;
    HIBYTE(seed[0]) ^= v10;
    }

  • @dingokidneys
    @dingokidneys หลายเดือนก่อน

    Very cool stuff. Your videos are inspiring as all this seems pretty accessible even without high end tools. What you really need is the curiosity to dig in deep.

  • @benhetland576
    @benhetland576 8 วันที่ผ่านมา

    23:54 The Python 'get_lookup' reveals the potential for an out-of-range index into the lookup table :-) It was present in the Ghidra decompiled code as well, but Python made it jump out of the screen at us. So maybe there's a hidden buffer overflow exploit lurking in the bushes too. It can happen when at least one of the four 'seed' bytes > 0x7F.

  • @user-qh5zz7dy1h
    @user-qh5zz7dy1h หลายเดือนก่อน

    A lot of interesting knowledge shared in a great manner, thanks Matt!

  • @dr.hinneredv932
    @dr.hinneredv932 หลายเดือนก่อน

    Thank you. The &3 seems to be strange, maybe originally thought of one additional layer of rotating.

  • @PowderMill
    @PowderMill 12 วันที่ผ่านมา

    Awesome channel … THANK YOU!
    I head up our radio comms system at work. (Public safety)
    We USED to utilize ARC4/ADP (Motorola) encryption because it was “cheap”.
    After being made aware of the vulnerabilities, we decided to go with AES-256.
    I always have a sneaking suspicion that the same “intelligence community! that protected Pederast Hunter Biden also somehow managed to have vulnerabilities added to AES-256. I’m no expert, but I love my country and fear the prying eyes of my government - actually , ALL governments !
    Thanks again for a great channel!

  • @noahkristoffersen6710
    @noahkristoffersen6710 2 วันที่ผ่านมา +1

    My god this guy is the biggest nerd, to ever walk this earth.

  • @skybuck2000
    @skybuck2000 หลายเดือนก่อน +2

    Jim Carrey as "Hacker" =D LOL.

  • @temp50
    @temp50 11 วันที่ผ่านมา

    Awesome video! But please do something with your mic next time, thanks! :)

  • @deginech1261
    @deginech1261 หลายเดือนก่อน +1

    I have little to no experience with decryption, but i like being submerged into this video A LOT

  • @RossRadford
    @RossRadford หลายเดือนก่อน

    That was my first thought, a simple substitution maybe with a little bit shifting. If I understand correctly, that's essentially what it is.

    • @RossRadford
      @RossRadford หลายเดือนก่อน

      or at least it's operating at that same basic level with xor.

  • @martynsmythe-jones6901
    @martynsmythe-jones6901 หลายเดือนก่อน +2

    Hail to you, Champion!

  • @suneskovgaard
    @suneskovgaard หลายเดือนก่อน

    Awesome video! Looking forward to the next one 😁

  • @Gowan08
    @Gowan08 หลายเดือนก่อน

    I really enjoyed your content, looking forward to future videos!

  • @Einimas
    @Einimas 16 วันที่ผ่านมา

    Spotting bytes made me hungry. But I like to eat WHEN i'm hungry.

  • @JNET_Reloaded
    @JNET_Reloaded หลายเดือนก่อน +12

    1st thing i would of done is passed back he decrypted value as encrypted to see if it reverts back to the value you past, likeall the n;s turning back into a's again then i prolly would of put the whole aplhabet in and see what comes out lol

  • @BothoHohbaum
    @BothoHohbaum 12 วันที่ผ่านมา

    That encryption algorithm is a hazard, man! I just wrote a comment, trying to analyze and point probable intentions and errors out, but i deleted it, it had no end....

  • @yxyk-fr
    @yxyk-fr 4 วันที่ผ่านมา

    At first I was ... whatever.
    20 minutes in, Schneier+Turing intensified 😛

  • @lewsdiod
    @lewsdiod 16 วันที่ผ่านมา

    Thanks! Really good and informative, as usual!

  • @Dvalin21
    @Dvalin21 19 วันที่ผ่านมา

    Have a chinese camera called LS-WL342-20X LS Vision. Would love to see what you can do with it. Its a camera that you would think once you've bought it, you have access to all of its features, but apparently they make you pay more for what should already be apart of the firmware.

  • @alexb9771
    @alexb9771 หลายเดือนก่อน

    Hey man appreciate this video series. You do a great job of explaining exactly how you got to where you are with this process. I also think your thought process on decrypting the proprietary crypto was awesome. Proof not to roll your own crypto lol

  • @royholman3467
    @royholman3467 หลายเดือนก่อน +1

    I definitely like watching your video,, I,m learning as we go. Thank you!!

  • @gryzman
    @gryzman หลายเดือนก่อน

    cryptogram and clear text, are the naming conventions there Matt;)

  • @aaronsilvers300
    @aaronsilvers300 3 วันที่ผ่านมา

    Fantastic Video! Thank you for sharing and all your effort ( :

  • @Bcowzz
    @Bcowzz 13 วันที่ผ่านมา

    Bro is the hero we didn't even know we needed

  • @Tomay-hx9mb
    @Tomay-hx9mb หลายเดือนก่อน +1

    Hey Matt, amazing videos, keep the super work up, very informative.
    Would you be able to hack Glinet routers? Anything similar to the portable ones similar to GL-MT3000 or GL-AXT1800?
    Those devices are apparently very secure, they receive regular updates, would be interesting to see if there any suspicious activity going on.

  • @mirabilis
    @mirabilis 6 วันที่ผ่านมา

    Are you that guy from "Is it a good idea to microwave this?"

  • @p0fs
    @p0fs หลายเดือนก่อน +1

    Your get_lookup function is somewhat wrong, bc it should not add (prev & 3) to the seed byte, but instead use (prev & 3) as a byte index of the seed. It would be more correct to declare seed as byte[4] instead of an int, and make SEED argument of the LookupElement function byte*, so that it is more obvious.

  • @williambrasky3891
    @williambrasky3891 หลายเดือนก่อน

    Amazing work! Thanks for sharing!

  • @SB-qm5wg
    @SB-qm5wg หลายเดือนก่อน

    Excellent work and thank you for explaining your steps.

  • @victorchorques4893
    @victorchorques4893 หลายเดือนก่อน

    Amazing job! Thanks for sharing.

  • @Y3ee
    @Y3ee 5 วันที่ผ่านมา

    I can only imagine the horror of the Chinese engineers listening to Matt make this video.

  • @MikkoRantalainen
    @MikkoRantalainen หลายเดือนก่อน +1

    22:15 The "SEED" is actually a proprietary hash of the "secret" (hardcoded) password and that's used as key for the actual encryption. And the actual encryption seems to be nearly static byte substitution cipher with slight obfuscation. I would guess the skill level of the original coder that implemented this is somewhere around first year CS student in university. You definitely shouldn't be trying to create your own encryption algorithm with that kind of skills.

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +1

      Thanks! Yeah figured that out now based on others feedback. next video takes it a step further and brute forces the key only based on the encrypted data :)

  • @royalaxe
    @royalaxe 9 วันที่ผ่านมา +1

    Dude. What's it like being married to Mavis from hotel Transylvania?

  • @idlewise
    @idlewise หลายเดือนก่อน

    Great work. Thank you!

  • @laulaja-7186
    @laulaja-7186 3 วันที่ผ่านมา +1

    Can anyone prove that proprietary encryption is worse than no encryption at all? Putting anything on servers in China is way up there, but I still think doing so without even basic encryption is maybe 1% worse for privacy.

  • @andyjrobb
    @andyjrobb 13 วันที่ผ่านมา

    I have some old security cameras lying around, perhaps I should do something similar.

  • @sandeepsinghsethi15
    @sandeepsinghsethi15 หลายเดือนก่อน

    Please collab with John Hammond , you have something unique to give among all the cybersecurity youtubers , and i would live to see your channel go boom

  • @kinggimped
    @kinggimped หลายเดือนก่อน

    Absolutely love your content and your explanations

  • @Lord-Sméagol
    @Lord-Sméagol 17 วันที่ผ่านมา

    And I was calling WEP "WEt Paper bag" encryption ... so this must be something like wet toilet paper encryption in comparison!

  • @mqx3888
    @mqx3888 หลายเดือนก่อน

    That 4 byte hash function could be the crc32 hash function (?) Maybe

  • @thecatofnineswords
    @thecatofnineswords หลายเดือนก่อน

    This video is your daily reminder that rolling your own encryption algorithms is nearly always a bad idea. It's hard to do it well, let alone robustly.

  • @halfsourlizard9319
    @halfsourlizard9319 19 วันที่ผ่านมา +1

    Proprietary encryption violates Kerckhoffs' principle fundamentally and suggests, at best, a severe misunderstanding about crypto.

  • @Bcowzz
    @Bcowzz 13 วันที่ผ่านมา

    This just hurt my brain.... In a good way 😂

  • @neb_setabed
    @neb_setabed หลายเดือนก่อน +1

    35:32 lol. that's a little funny considering you're posting this to TH-cam

  • @rdflo6739
    @rdflo6739 8 วันที่ผ่านมา

    Nice video, now my immediate thought was wether you can encrypt a jpg file with malware on it and send it China, try and gain access to the server. How cool would that be?

  • @NiklasAndersson7
    @NiklasAndersson7 5 วันที่ผ่านมา

    [data] XOR 0xCC (CC as in CCP) - 'All your passwords are belong to us'

  • @lukaszmachowski
    @lukaszmachowski 4 วันที่ผ่านมา

    The mystery function reminds me of the Mersenne Twister or similar RNG (random number generator) algorithm. I haven’t played with your code but only gut feeling comment. Ideas?

  • @woutervankesteren3204
    @woutervankesteren3204 หลายเดือนก่อน

    Maybe its me misunderstanding Ghidra, but at 22:22 doesnt that mean the reference is simply used AS the seed, as in the pointer value to the memory on the stack. Makes me think the entire contents of the SEED value is absolutely useless and they are just using the address of the SEED instead.

  • @Nashenas88
    @Nashenas88 หลายเดือนก่อน +1

    what's your pogo pin setup? How do you keep the pins in place without having to hold onto them?

    • @mattbrwn
      @mattbrwn  หลายเดือนก่อน +1

      PCBite probes. they are magnetic and weighted so they don't move around much. very high quality product.

  • @boogieman97
    @boogieman97 หลายเดือนก่อน

    This looks to me very likely to be derived from RC4 S-Box.

  • @spaghettiman600
    @spaghettiman600 6 วันที่ผ่านมา

    I don’t know… I find some comfort in Apple being snobby and having their ways. I have dipped my foot back in the pool and using Windows laptop and Android phone (my side pieces), and the Google phone is ok but not as good as the iPhone, and the Windows laptop plays video games ok I guess, but pales in comparison to a MacBook. My Mac lasted for eight years with no issues until the hardware outlasted the software updates. The Windows laptop… even with protection… in less than a year it was subject to a DNS attack, and I was pretty darn careful. My faith in most of these products has been shaken, and I think I am sticking to cellular everything using zero WiFi.

  • @RozanaJob
    @RozanaJob หลายเดือนก่อน +1

    china is really on dat sauce

  • @WWFYMN
    @WWFYMN หลายเดือนก่อน +4

    I would have reversed the decrypt and encrypt functions in the android phone app since java is easier to reverse engineer

    • @Ruhrpottpatriot
      @Ruhrpottpatriot หลายเดือนก่อน

      That assumes that the encryption is the same. Remember it goes via a china hosted server.

    • @WWFYMN
      @WWFYMN หลายเดือนก่อน

      @@Ruhrpottpatriot that would be really scary if it wasnt the same, if it was the same there is a chance that it was still opened but not being the same confirms that, why do people trust dodgy Chinese stuff

  • @chsovi7164
    @chsovi7164 2 วันที่ผ่านมา

    How are you finding these things with proprietary encryption in the first place? I'm into cryptography but want to get into hardware stuff and this sounds super cool. But I don't know what I would even look for to find something using proprietary encryption

  • @kingofl337
    @kingofl337 10 วันที่ผ่านมา

    I think the biggest thing this shows is disable the console output when you release a product.

    • @mattbrwn
      @mattbrwn  10 วันที่ผ่านมา

      So wrong

  • @EduardoRubioLogan
    @EduardoRubioLogan หลายเดือนก่อน

    This is really great tutorial + educational

  • @replikvltyoutube3727
    @replikvltyoutube3727 หลายเดือนก่อน

    That's a really nice video. I learned something new from it

  • @HenryKlausEsq.
    @HenryKlausEsq. หลายเดือนก่อน

    This series was excellent.

  • @xephael3485
    @xephael3485 2 วันที่ผ่านมา

    10+ Chinese have thumbed down this video

  • @jovanjanevski3747
    @jovanjanevski3747 7 วันที่ผ่านมา

    Wait, wait, wait... You did not explain wheredid you get that binary from? Was it a daemon from the camera? How did you mount the filesystem?

    • @mattbrwn
      @mattbrwn  7 วันที่ผ่านมา

      Walked through this in the previous couple videos :)
      Extracted firmware and figured out the root password from that

  • @MrEagleeye58
    @MrEagleeye58 หลายเดือนก่อน

    I guess the most important question is : Are these products stealing private data? Have rouge commands come in to take snapshots and send them back out to the ethernet?
    That would probably need time to observe.