
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
github.com/pekingducky/cryptography1-week2-go
We will use Python to create a program that will implement encryption/decryption systems, one using AES in CBC mode and another using AES in counter mode (CTR).
In both encryption/decryption systems, the 16-byte encryption IV is chosen at random and is prepended to the ciphertext. For CBC encryption we use the PKCS5 padding scheme discussed in the lecture (14:04). We have been asked to implement both encryption and decryption, but we will only be tested the decryption function.
In the following questions (1-4) we are given an AES key and a ciphertext (both are hex encoded). Our goal is to recover the plaintext and enter it in the input boxes provided below. For an implementation of AES we may use an existing crypto library such as PyCrypto (Python), Crypto++ (C++), or any other. While it is fine to use the built-in AES functions, as learning experience, we must implement CBC and CTR modes ourselves.
Question 1:
CBC key: 140b41b22a29beb4061bda66b6747e14
CBC Ciphertext 1: 4ca00ff4c898d61e1edbf1800618fb2828a226d160dad07883d04e008a7897ee2e4b7465d5290d0c0e6c6822236e1daafb94ffe0c5da05d9476be028ad7c1d81
Question 2:
Question 3:
Question 4:
Result 1: Basic CBC mode encryption needs padding.
Result 2: Our implementation uses rand. IV
Result 3: CTR mode lets you build a stream cipher from a block cipher.
Result 4: Always avoid the two time pad!
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.