summaryrefslogtreecommitdiffstats
path: root/viris
diff options
context:
space:
mode:
Diffstat (limited to 'viris')
-rwxr-xr-xviris/coin/a.py38
-rw-r--r--viris/coin/challenge32
-rw-r--r--viris/coin/ssh87
3 files changed, 157 insertions, 0 deletions
diff --git a/viris/coin/a.py b/viris/coin/a.py
new file mode 100755
index 0000000..6bd19c6
--- /dev/null
+++ b/viris/coin/a.py
@@ -0,0 +1,38 @@
+#!/usr/bin/python3
+from ecdsa import SigningKey, NIST384p
+import paramiko
+from cryptography.hazmat.primitives.serialization import (
+ Encoding, PrivateFormat, PublicFormat, NoEncryption
+)
+sk = SigningKey.generate(curve=NIST384p)
+sk_string = sk.to_string()
+sk2 = SigningKey.from_string(sk_string, curve=NIST384p)
+print(sk_string.hex())
+print(sk2.to_string().hex())
+print("--------------")
+pk0 = bytes.fromhex("06cadf8035a6102e6ad0d1ef86c8a68c34a680d5f488d4ba45ef768033ef89ee5f818f4980c2f284c05a176049876ada")
+myO = SigningKey.from_string(bytes.fromhex("06cadf8035a6102e6a38d1ef86c8a68c34a680d5ce88d4ba45ef768033ef89ee5f818f4980c2f284c05a176049876ada"), curve=NIST384p);
+my0 = SigningKey.from_string(pk0, curve=NIST384p)
+print(myO.to_string().hex())
+print(my0.to_string().hex())
+with open("/tmp/O", "wb") as f:
+ f.write(myO.to_pem())
+ print(myO.to_pem())
+with open("/tmp/0", "wb") as f:
+ f.write(my0.to_pem())
+ print(my0.to_pem())
+print("___________");
+keyO = paramiko.ECDSAKey.from_private_key_file("/tmp/O")
+key0 = paramiko.ECDSAKey.from_private_key_file("/tmp/0")
+with open("/tmp/O_ecdsa", "wb") as fh:
+ data = keyO.signing_key.private_bytes(Encoding.PEM, PrivateFormat.OpenSSH, NoEncryption())
+ fh.write(data)
+with open("/tmp/O_ecdsa.pub", "wb") as fh:
+ data = keyO.verifying_key.public_bytes(Encoding.OpenSSH, PublicFormat.OpenSSH)
+ fh.write(data + b"\n")
+with open("/tmp/0_ecdsa", "wb") as fh:
+ data = key0.signing_key.private_bytes(Encoding.PEM, PrivateFormat.OpenSSH, NoEncryption())
+ fh.write(data)
+with open("/tmp/0_ecdsa.pub", "wb") as fh:
+ data = key0.verifying_key.public_bytes(Encoding.OpenSSH, PublicFormat.OpenSSH)
+ fh.write(data + b"\n")
diff --git a/viris/coin/challenge b/viris/coin/challenge
new file mode 100644
index 0000000..02c7695
--- /dev/null
+++ b/viris/coin/challenge
@@ -0,0 +1,32 @@
+ Bsrfg
+ DWmEC5qO
+ NHvhsimjD
+SmgNXOiNS6
+Re92gDPvie
+5fgY9JgMLy
+ hMBaF2BJ
+ h2ra
+
+BsrfgDWmEC5qONHvhsimjDSmgNXOiNS6Re92gDPvie5fgY9JgMLyhMBaF2BJh2ra
+BsrfgDWmEC5q0NHvhsimjDSmgNX0iNS6Re92gDPvie5fgY9JgMLyhMBaF2BJh2ra
+
+135.181.103.125
+
+06cadf8035a6102e6a38d1ef86c8a68c34a680d5ce88d4ba45ef768033ef89ee5f818f4980c2f284c05a176049876ada
+06cadf8035a6102e6ad0d1ef86c8a68c34a680d5f488d4ba45ef768033ef89ee5f818f4980c2f284c05a176049876ada
+
+01001000
+00001 A
+00111 G
+00101 E
+00011 C
+00101 E
+00001 A
+00010 B
+00010 B
+01000 H
+0000100
+0011110
+0000001
+0001010
+0000001
diff --git a/viris/coin/ssh b/viris/coin/ssh
new file mode 100644
index 0000000..c9c4808
--- /dev/null
+++ b/viris/coin/ssh
@@ -0,0 +1,87 @@
+OpenSSH_9.1p1, OpenSSL 1.1.1t 7 Feb 2023
+debug1: Reading configuration data /root/.ssh/config
+debug1: /root/.ssh/config line 1: Applying options for *
+debug1: Reading configuration data /etc/ssh/ssh_config
+debug2: resolve_canonicalize: hostname 135.181.103.125 is address
+debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
+debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
+debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
+debug1: auto-mux: Trying existing master
+debug1: Control socket "/tmp/root-root@135.181.103.125:22" does not exist
+debug3: ssh_connect_direct: entering
+debug1: Connecting to 135.181.103.125 [135.181.103.125] port 22.
+debug3: set_sock_tos: set socket 3 IP_TOS 0x48
+debug1: Connection established.
+debug1: identity file /root/.ssh/id_rsa type 0
+debug1: identity file /root/.ssh/id_rsa-cert type -1
+debug1: identity file /root/.ssh/id_ecdsa type -1
+debug1: identity file /root/.ssh/id_ecdsa-cert type -1
+debug1: identity file /root/.ssh/id_ecdsa_sk type -1
+debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
+debug1: identity file /root/.ssh/id_ed25519 type -1
+debug1: identity file /root/.ssh/id_ed25519-cert type -1
+debug1: identity file /root/.ssh/id_ed25519_sk type -1
+debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
+debug1: identity file /root/.ssh/id_xmss type -1
+debug1: identity file /root/.ssh/id_xmss-cert type -1
+debug1: identity file /root/.ssh/id_dsa type -1
+debug1: identity file /root/.ssh/id_dsa-cert type -1
+debug1: Local version string SSH-2.0-OpenSSH_9.1
+debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
+debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.5 pat OpenSSH* compat 0x04000000
+debug2: fd 3 setting O_NONBLOCK
+debug1: Authenticating to 135.181.103.125:22 as 'root'
+debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
+debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
+debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
+debug3: order_hostkeyalgs: no algorithms matched; accept original
+debug3: send packet: type 20
+debug1: SSH2_MSG_KEXINIT sent
+debug3: receive packet: type 20
+debug1: SSH2_MSG_KEXINIT received
+debug2: local client KEXINIT proposal
+debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
+debug2: host key algorithms: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
+debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
+debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
+debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
+debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
+debug2: compression ctos: none,zlib@openssh.com,zlib
+debug2: compression stoc: none,zlib@openssh.com,zlib
+debug2: languages ctos:
+debug2: languages stoc:
+debug2: first_kex_follows 0
+debug2: reserved 0
+debug2: peer server KEXINIT proposal
+debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
+debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
+debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
+debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
+debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
+debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
+debug2: compression ctos: none,zlib@openssh.com
+debug2: compression stoc: none,zlib@openssh.com
+debug2: languages ctos:
+debug2: languages stoc:
+debug2: first_kex_follows 0
+debug2: reserved 0
+debug1: kex: algorithm: curve25519-sha256
+debug1: kex: host key algorithm: ssh-ed25519
+debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
+debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
+debug3: send packet: type 30
+debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
+debug3: receive packet: type 31
+debug1: SSH2_MSG_KEX_ECDH_REPLY received
+debug1: Server host key: ssh-ed25519 SHA256:riAv8OLPMA9wD317f1ZGjzh8mWKSIpxiKXabbMV2YMg
+debug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory
+debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
+debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
+debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/root/.ssh/known_hosts"
+debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"
+debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/root/.ssh/known_hosts2"
+debug1: hostkeys_find_by_key_hostfile: hostkeys file /root/.ssh/known_hosts2 does not exist
+debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts"
+debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
+debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts2"
+debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist