Clearing past challenges
parent
3b8b9fdba8
commit
9eb3989ee4
|
@ -1,7 +0,0 @@
|
|||
## Cryptography challenge (Rust)
|
||||
|
||||
TBA
|
||||
|
||||
_Keccak256:
|
||||
|
||||
_Challenge author:
|
|
@ -1,9 +0,0 @@
|
|||
## Dan's storage is not private - Solidity challenge
|
||||
|
||||
The story goes like... your friend Dan from crypto Telegram requested you to audit this small smart contract. You need to prove that it is easy to steal the flag and show "private" is not private.
|
||||
|
||||
Figure out the flag by using the Solidity smart contract provided. The goal is to correctly follow the assemble logic of the concat in is_it_on_chain().
|
||||
|
||||
_Keccak256: 0x81b1ff6939fedd672ddac358a41abb7192ae1f0660a3b1cbf92ef2c82119612b_
|
||||
|
||||
_Challenge author: six_
|
|
@ -1,66 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
pragma solidity ^0.8.17;
|
||||
import "@openzeppelin/contracts/utils/Strings.sol";
|
||||
|
||||
/// @title On-chain storage to save a precious memory of you life
|
||||
/// @author Challenge inspired by CCTF, coded by six
|
||||
/// @notice The flag should return when the data is on-chain.
|
||||
contract PMC_Sol_Challenge {
|
||||
// Declare everything needed in the contract
|
||||
address private admin = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
|
||||
uint160 door = 0;
|
||||
event contractStart(address indexed _admin);
|
||||
uint256 public pin;
|
||||
string private start;
|
||||
string private data;
|
||||
string private end;
|
||||
string private flag;
|
||||
string private result;
|
||||
bytes32 private data_store;
|
||||
uint private data_set;
|
||||
string private ds_to_Str;
|
||||
|
||||
// O, that is nasty!
|
||||
constructor(address O) payable {
|
||||
emit contractStart(admin);
|
||||
admin = 0==0?O:0x0000000000000000000000000000000000000000;
|
||||
pin = block.number + block.timestamp; // "Random" pin
|
||||
start = "PMC{";
|
||||
data_set = 0;
|
||||
end = ".NiceTry}";
|
||||
}
|
||||
|
||||
/// @notice Mod
|
||||
function callAddMod() public pure returns(uint){
|
||||
return addmod(4, 5, 3);
|
||||
}
|
||||
|
||||
/// @notice Only the central admin should be able to store his life memory in bytes32.
|
||||
function store_me_on_chain(bytes32 _data) public returns (string memory) {
|
||||
require(msg.sender == admin, 'Not admin');
|
||||
data_store = _data;
|
||||
data_set = asmbl();
|
||||
ds_to_Str = Strings.toString(data_set);
|
||||
return data = string("den_who_is_dan_");
|
||||
}
|
||||
|
||||
/// @notice Generate number
|
||||
function asmbl() public view returns (uint8 b) {
|
||||
assembly {
|
||||
let c := add(27, 16)
|
||||
mstore(0x80, c)
|
||||
{ let d := add(sload(c), 255) b := d }
|
||||
b := add(b, c) }
|
||||
}
|
||||
|
||||
/// @notice The admin wants to check the data is on chain and return the flag if is!
|
||||
function is_it_on_chain(uint256 _pin) external returns (string memory) {
|
||||
require(msg.sender == admin, 'Not admin');
|
||||
require(pin == _pin, 'Wrong pin');
|
||||
require(data_set > 1, 'Nothing in the on-chain storage');
|
||||
flag = string.concat(start,data,ds_to_Str,end);
|
||||
return flag;
|
||||
}
|
||||
|
||||
fallback() external {}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
## Fibonacci WSS challenge
|
||||
|
||||
Connect to the WSS service and solve the challenge presented:
|
||||
|
||||
This challenge requires you to have basic problem solving and coding skills. Any language is accepted for get the solution. Please make sure to upload your solution through the form when you submit it.
|
||||
|
||||
You need to send the sequence one by one.
|
||||
|
||||
_Keccak256:
|
||||
|
||||
_Challenge author: Natoshi Sakamoto_
|
Loading…
Reference in New Issue