Page 1 of 1

Time Delay lock Box

Posted: 2018-08-10 22:20
by bester69
Hi,
I need a free cloud service (Store Data or Password Manager), where I can store a password key (or a txt file), with a programmable/defined temporary access window. In that window time, the cloud system must not be let you do anything (cant connect/login in anyway possible) ... Its an auto-locked system from owner, like a strongbox with a programmable timer.

As I explain myself very bad, I'd like to have any app/script solution to get this.:
lock schedule: is used in safes installed in jewelry stores, lottery administrations, bingo halls, etc., and allows you to program a time window in which the box can not be opened under any concept even if the security code is entered.
Example.:
We schedule a window time forbidden gap access from 22pm to 8am, later the cloud service would be accessible again , so we'd be able to connect and dowload the password key (or txt file)..

Do you happend to know any cloud solution? a local solution also would be ok, but it must prevent myself access outside that setted temporary window, and I think Oneself can fake the timesystem,

Image

Thanks a lot, Its very important to me to get a solution to this problem. :?

Re: Time Locking Safe Box

Posted: 2018-08-11 11:07
by bester69
To prevent myself access outside a temporary window

I found a kind of workaround solution.:

My idea is to use john-the-ripper + a random alphanumeric 4/5 digits encryptation container. >> Using Force brute, It takes longer than X hours/days to unencrypt the locking box file container.

Ejemo.:
Step1. Store file in encrypted Zip container

Code: Select all

VRAN="$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 4 | head -n 1)"
zip -P "$VRAN" out.zip *.txt
rm *.txt
Step2. Unencrypt Zip container. >> It takes longer than X hours/days to unencrypt the Zip

Code: Select all

sudo snap run john-the-ripper.zip2john out.zip > johnpass.hash
sudo snap run john-the-ripper --incremental:alnum johnpass.hash
sudo snap run john-the-ripper --show johnpass.hash > keyPass.txt

Re: Time Locking Safe Box

Posted: 2018-08-11 11:25
by bester69
I want it for this purpose:
https://www.youtube.com/watch?v=5WdaimrO5BU

I will change "Signature master Key operation bank" before going out, so that way when I be drunk :oops: I wont be able to edit and operate any pre-fixed credit card limit operation. :? :oops:
Sadly Ive got in past a lot of demonic realm in life due to bad habbits, and when I come out and drink some cops they come up and take control over the situation, so I need to put myself some firewalls against that phenomena.

Re: Time Locking Safe Box

Posted: 2018-08-12 00:36
by jibberjabber
If you have a drinking problem, and it sounds like you do, Wouldn't the best solution be to just not drink ?
https://www.aa.org/pages/en_US/is-aa-fo ... can-answer

Re: Time Locking Safe Box

Posted: 2018-08-12 07:58
by debiman
^ yes, you are really helping. helping yourself to believe that you are better than others. pp.
bester69 wrote:Sadly Ive got in past a lot of demonic realm in life due to bad habbits, and when I come out and drink some cops they come up and take control over the situation, so I need to put myself some firewalls against that phenomena.
probably as a direct result of your bad habits, i do not understand a word of this.
esp: "I come out and drink some cops they come up and take control over the situation" ??? :scratchbeard:

Re: Time Locking Safe Box

Posted: 2018-08-12 15:29
by bester69
.

Re: Time Locking Safe Box

Posted: 2018-08-12 17:50
by arochester
Please stay on-topic.

Re: Time Locking Safe Box

Posted: 2018-08-18 23:13
by bester69
So, How can we prevent oursleves for a determinated time period ?? , Do you happend to know about any way/tool to get this? :(
As I explain myself very bad, I'd like to have any app/script solution to get this.:
lock schedule: is used in safes installed in jewelry stores, lottery administrations, bingo halls, etc., and allows you to program a time window in which the box can not be opened under any concept even if the security code is entered.
Im now using as a workaround solution, a force-brute process unecripting file for a pre-calculated 1 day blocking estimation period (a 6 characters word in my system)..


Thanks.

Re: Time Delay lock Box

Posted: 2018-08-19 22:53
by bester69
Ive been investigating a litle bit and It seems there is no a properly software/Solution available for this purpose, Here another kind of workaround Solution:

https://www.quora.com/Is-it-possible-to ... e-in-Linux
Will Stagger, Scientific Programmer
Answered Sep 17, 2015
Googled this myself and just thought of a solution using the Boomerang Gmail extension which allows you to delay sending an email until a certain time. Create a throwaway gmail account, encrypt / password protect the file you want to time lock, make the password to throwaway account the password key or a random string you won't remember. Send yourself an email to your real email with the file unlock key and the gmail account password so you can use it again later and time delay the sending until desired.

Cons: can't use the same throwaway while files are locked, so have to create many throwaways or lock them all at once although they can all have different unlock times.

Re: Time Delay lock Box

Posted: 2018-08-22 13:32
by bester69
Ok, I finished my "Time Delay lock Box" by using John Ripper 8) 8) It works like a charm! (very tested)
Considerations:
- target file: file.xwd (keepassx file)
- Np: Number of chunks to slice the target file before encrypting. It serves to linear increasing time probably decoding (we can just leave it to One).
( ProbablyTime decoding x Nº Chunks) == 1 day/Hours x Np
- Nc: Encrypted word length (It grows exponential the decoding times)

Requirements
- john Ripper (snap)
- gcolor2 (Used as a flag stop screen to check all before destroy target files)
- sudo chattr (need to be added in sudoers)
- keepassx (target file)

Theses are the scripts,

rip.sh (It encrypts the target file with a random password and once done, It destroys the files to encrypt)

Code: Select all

#!/bin/sh
#
APATH=/home/user/LINUXDEBS/rip
INI=`date +%Y-%m-%d_%H:%M:%S`
# Partes dividido de encriptado
Np=1
#Caracteres de encriptado
Nc=5
#**************************
FICH="$1"
#VRAN="$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 5 | head -n 1)"
#5 CARACTERES, VAN DESDE MINUTOS HAST 7 HORAS
cd $APATH && mkdir done

# Split en N partes para aumentar el tiempo de cifrado---------------------
rm -rf .zzSplit/ 
mkdir .zzSplit && mv *.xwd .zzSplit/ && cd .zzSplit/
split -n$Np *.xwd split_
for f in split_*
do
VRAN="$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w $Nc | head -n 1)"
#echo "RANDOM=$VRAN"
  mv $f $f.part.xwd
  zip -P "$VRAN" $f$INI.zip $f.part.xwd
  echo $VRAN > $f$INI.zip.txt
done
mkdir sal$INI && mv *.zip *.txt sal$INI && mv sal$INI ../done/
sudo chattr +i ../done/sal$INI/*.zip
 cd ../. && rm -rf .zzSplit/
# Split en N partes para aumentar el tiempo de cifrado---------------------
mkdir undone
ln -sf ../done/sal$INI/ ./undone/ &&  cd undone && rm sal
mv  sal$INI sal

#Verifica q esta correctamente añadido
   cd $APATH/done/sal$INI/
   for f in split_*.zip
   do
   VRAN=$(cat $f.txt)
   unzip -P "$VRAN" $f
   done
 cat split*.xwd > out.xwd 
# 
#  #Control@@@@@@@
# dolphin out.xwd &
 sleep 5
 gcolor2
 killall keepassx
# #Control@@@@@@@
# 
 rm *.txt *.xwd
 sudo chattr +i ./
# 
unrip.sh (It unecrypt the generated file/ sliced files by using force-brute, generating txt files with the passwords to unecrypt them and merge them)

Code: Select all

#!/bin/sh
#
APATH=/home/user/LINUXDEBS/rip
VARL=/tmp/xxYaS
CONT=""
INI=`date +%Y-%m-%d_%H:%M:%S`
FICH="$1"
#VRAN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 2 | head -n 1)
rm -rf /home/user/snap/john-the-ripper/
clear
cd $APATH && mkdir undone 
rsync -aAXv --delete $APATH/undone/sal/ $APATH/undone/ --exclude=sal

cd $APATH/undone
for f in split_*
do
# Cálcula riempo-----------------------------
killall timerout.sh -9
# Cálcula riempo-----------------------------

cp -f $f part.zip
snap run john-the-ripper.zip2john part.zip > johnpass.hash
#sudo snap run john-the-ripper --incremental:LowerNum johnpass.hash
snap run john-the-ripper --incremental:LowerNum johnpass.hash
snap run john-the-ripper --show johnpass.hash > clave$f.txt

CONT=$(cat $VARL/contador.txt)
killall timerout.sh -9
echo "Tiempo Procesado $f: $CONT" >> logTiempo$INI.txt

done

FIN=`date +%Y-%m-%d_%H:%M:%S`
echo "$FICH Comenzo a $INI y termino a $FIN" >> logTiempo$INI.txt
cat clave*.txt >> logTiempo$INI.txt
sudo chattr +i logTiempo$INI.txt
timerout.sh (It works as a counter timer for the decoding task)

Code: Select all

#!/bin/bash
#
VARL=/tmp/xxYaS
rm -rf $VARL
mkdir /tmp/xxYaS
for (( c=1; c>=1; c++ ))
do  
CONT=$(date -d@$c -u +%H:%M:%S)
# clear
#echo -ne "Welcome $CONT times"
sleep 1
  printf "\r%2d $CONT Welcome times"
  echo $CONT > $VARL/contador.txt
done &