#cybersecurity

7 messages Β· Page 6 of 1

silent pier
#

Fair enough

#

Would also have to slightly change the protocol I think to allow for "hey you need to validate"

#

Ooor just have it be passed automatically per request FeelsThinkingMan

upbeat palm
#

How can you generate new tokens and remove old tokens,then you have to send the new tokens for validation.

silent pier
#

Hey you need to validate as in please login again

upbeat palm
#

That's some serious stuff for me.
As I said earlier,good idea. Floppy

silent pier
#

Well it is a course in security after all :p

upbeat palm
#

Course in security?biskthink

silent pier
#

Software security to be more specific

orchid notch
#

I had a lecture at the TUM about secure system design once, the prof repeated the 4 principles of security again and again
Encryption
Authenticity
liability
Aaaaand uhhh access control I think

#

Yeah access control

#

Apparently that's what makes secure software

silent pier
#

Theres more to in depth ofc

#

but most of it, in a general list

upbeat palm
#

Let me save it in Google keep.

#

@silent pier Where can I know about it?

silent pier
#

wdym?

#

The course im taking at my uni Smuglifepepe

upbeat palm
#

Oh, sorry.
My professors aren't that good so I have to rely on online resources that's why I asked.

tight abyss
#

@silent pier Instead of bothering with a database, it might be another good approach to do something JWT-style ("Java Web Token")

#

They basically contain the data you need, like user id and expiration date directly in the token, plus having that payload signed with a private key of the server, so that the client can not change the payload without being detected

#

That way you never have to actually remember the tokens on the server, you just create them when needed and verify their payload and signature when you receive one

silent pier
#

Ill look into it

valid furnace
#

@silent pier in what context?

#

basically auth tokens

safe bear
#

@silent pier a possibly good place to look would be OAuth implementations

#

I don't want to make suggestions because that knowledge is two years rusty and I'd probably tell you something very wrong

tight abyss
#

OAuth is more about how to log in/authenticate with possibly a third party. It still requires you to manage a token to remember the client.

thorn obsidian
#

@silent pier generally the safest way to do token based auth is to create a token based on some random secret + the client IP and store it with a created-at timestamp and an expire-at timestamp in the database, then set it as a cookie in the client browser and check if the token is valid for that IP and if it's expired or not when the client makes a request

#

make the expiration like 24 hours of no activity or something, and just bump it whenever an action is done with that token

#

depending on how much security you need you could also have a maximum use time where it forces a token change once every month or whatever

#

in saying this I would discourage the use of a hash for token authentication since if someone generates a token using the IP and guessing the secret they basically have login permission for that user

#

but i'm not sure what a good alternative is

#

I just know it's a good idea to lock it based on IP

#

probably good to store the client IP in the DB next to a UUID or something

#

buuut, dynamic IPs are a thing and that's annoying so you could drop it all together and just do UUID with expire times, which is generally accepted as a good enough solution

#

JWT stuff is also a good idea

silent pier
#

@thorn obsidian I dont really have ips so I guess ill generate a uuid for each user. But how do I give that to the user in a safe way

#

Actually lemme quote the protocol im creating

thorn obsidian
#

ah

#

you give them to the client via browser cookies, making sure to set the HttpOnly flag and Secure flag to ensure they're only transferred by the client over HTTPS and not accessible via javascript

#

if it's not on a website then just try to make sure it's transfered in a secure way and stuff

silent pier
#

Its not browser based either, its just over sockets

#

Final version over TSLsockets

thorn obsidian
#

yea that's fair

#

most stuff still applies

silent pier
#

So upon reading about how create a UUID it says I need a namespace + name (or high + low significance), in my socket protocol what would this namespace be?

lilac gulch
#

@silent pier Try a different uuid function (v4, i think) that doesnt require a namespace

silent pier
#

Are they still unique then?

#

There wasn't much about them in the article i read, just that they are based on random numbers

lilac gulch
#

Namespace determines the "format" for lack of a better word

#

For socket stuff, uuid1 may be handy

tight abyss
#

If all you need is a unique token, and you'll store them on the server anyway, just generate completely random 128 bit (cryptographic RNG preferably) and add an additional check to avoid the almost impossible chance of having handed out that token already

#

I see no need to bother with UUID standards or whatnot in your case

simple orchid
#

if you want to guarantee uniqueness you could use a 'snowflake' technique like Discord

#

those are only 64 bits, too

silent pier
#

The one part that doesnt quite stick with me is how the user uses this token to authenticate

#

do i just pass their token to the user, and they provide it if they have one

#

and that's it?

#

Or would I store a combination of a key (that i give the client) and their username into a hash or something

simple orchid
#

the point is

#

they give their usual credentials (username/password, email/password, already logged in session) to site A, and get the token. site A also sends the token to site B.

#

the user proves to site B that they have the token, therefore proving that they were able to log in to site A

#

(also, i didn't realize you were doing token authentication - a discord-style snowflake id is absolutely inappropriate for that. they should be completely random)

silent pier
#

yee, its a token based authentication for a socket client-server

thorn obsidian
#

no that's not the way it always works @simple orchid

#

that's just the way Oauth works

#

cookie tokens are different

#

@silent pier in this case they send the username and password from the user once, then get a token and store that then reuse it instead of password as authentication

#

it stops the program needing to store passwords or constantly ask the user for passwords

#

don't use a hash

#

just use a UUID function and make sure the output is not a duplicate of another token

#

tokens should expire etc etc as above

silent pier
#

Right

#

Only one way to get this rolling then, actually try it thumbsup

thorn obsidian
#

haha good luck

simple orchid
#

i thought we were talking about oauth

shell gulch
#

Hey everyone

#

I'm kinda stuck in web-dev atm and I want to get closer to doing information security. I'm curious on certs that get taken seriously by medium / large orgs that I could do?

#

Namely to do with things like pen testing.

thorn obsidian
#

none of the certs are worth it

#

everything except an OSCP and maybe the NSA information security masters is useless

#

orginisations require shit like CEH for jobs, but it's the most backwards stuff ever, you might come out knowing less about security than you did going in

#

command shell trojan

netcat

upbeat palm
#

@thorn obsidian CEH is total crap.

thorn obsidian
#

yeah

#

it is

upbeat palm
#

I tried online quiz of CEH and tbh a kid can pass it too without knowing anything.

valid furnace
#

@thorn obsidian that shit is why I cannot stand people that say "I got all of the certifications and stuff"

thorn obsidian
#

lol

#

yea they're dumb

#

most of them are useless

valid furnace
#

or people that speak in pure jargon

thorn obsidian
#

double fuck those people

#

they know what they're doing and it's fucking dumb

#

they need to stop

thorn obsidian
valid furnace
#

@thorn obsidian
/me immediately goes to download said information

thorn obsidian
#

lol

safe bear
#

Can't say I fully agree with the jargon statement

#

If you're doing anything with networks and systems, which is a huge portion of cybersec, then you're going to use a lot of jargon

#

You can sometimes reduce the use of acronyms, but not jargon

#

Didn't realize CEH was such garbage though, that's good to know...

#

OSCP is good, and I think the SSCP (Systems Security Certified Practitioner) is also good

#

Personally, I found doing the CCNA (Cisco Certified Network Associate) was invaluable, since you learn a ton of networking fundamentals and architecture

rigid plinth
#

Hi guys, I'm new to the server, so apologize if I'm asking this in the wrong place. I am a Python coder moving from beginner to intermediette. I am still very new to this, but I do know that I'm not going into web dev. From the different things I poked my head around in, I realized I would like to work either in OS dev (so contribute to Linux kernal or any distros in the long run) and/or work in security. What kind of questions should I be asking myself if I'm thinking of these path(s)? There are a lot of resources out there, but I need to know what to ask - so any suggestions would be helpful πŸ˜ƒ

safe bear
#

Check the pins

#

There are several good sources of information in there

#

Keep up with those, and maybe try your had at OverTheWire

#

Regularly read stuff in the field for a while. Do that for a bit and see if you're finding it to be more of a slog or if you're thinking "wow that's cool".

#

@rigid plinth

valid furnace
#

@safe bear haven't taken any CCNA classes, but I can setup network switches and routers just fine, although it takes me a bit longer. πŸ˜‰

safe bear
#

I didn't take any either, learned by messing around with old equipment from eBay with my father and reading, and lots of practice tests and quizzes

#

It was difficult for a while but eventually it clicked

rigid plinth
#

thanks @safe bear , I'm looking at them right now. The Bandit game looks very interesting - do you know if it's suitable for a noob?

safe bear
#

Some of the stuff on there is kind of a waste of time though, like token rings lmao

#

Yes, it is @rigid plinth

#

The point is to learn as you go

valid furnace
#

@safe bear my last workplace had problems with rogue DHCP servers, it was both stupid and horrific.

#

I learned to trace those down from CMTS

safe bear
#

There are some clues, but the whole point is you are supposed to Google and search for answers @rigid plinth

#

Oh wow

rigid plinth
#

that's awesome. I have no problems at all doing that - just making sure that all of a sudden, I don't have to realize that I need a CS degree to figure it out

safe bear
#

Rogue DHCP eek

#

haha yeah

#

it may seem like that, but if you get really stuck, sleep on it, give it another try.

#

If you're still stuck, there's nothing wrong with looking up the answer.

rigid plinth
#

sounds good. thanks for the words of advice :)
this really seems like a great place to start with security πŸ˜ƒ

safe bear
#

Yes, that is a good mix of stuff

upbeat palm
#

I thought of taking CCNA course but now I'm not.

safe bear
#

Why's that?

#

Self-study worked well for me, but structure is helpful especially if you're having to manage time around other things

upbeat palm
#

Institutions offering CCNA course here don't have a good review.

valid furnace
#

@safe bear without breaking NDA, imagine an endpoint modem fucking up and DHCP serving across the entire cable/cmts network.

lusty flare
#

Hmmm

#

Not possible to use Rogue DHCP detection on the switches?

#

We had to implement that here after people kept plugging in stupid shit to the network

safe bear
#

If the modem is the perpetrator...how do you deal with that?

#

Isn't the equipment pretty low level until you hit the distribution layer?

lusty flare
#

DHCP is layer 2 tech

#

So it's well within a switches purview

lusty flare
#

Well, i mean i was being a tad simplistic there

#

but you can block it through layer 2 only

silent pier
#

How high of a prime is required for diffie hellman to be safe?

lusty flare
#

largest number to not be vulnerable to attack i guess

#

what was that attack vs diffie

#

NFS?

silent pier
#

unsure about the terminology, im just aware of a brute force way, and man in the middle attack

lusty flare
#

Seems like NFS has been demonstrated against stuff towards 2^750ish

silent pier
#

oof

lusty flare
#

so like 250digits

#

i guess

upbeat palm
#

Nix is Cryptography expert here.

lusty flare
#

tbh i've just seen people using 2048

#

Β―_(ツ)_/Β―

silent pier
#

Time to find my prime

orchid notch
#

Apparently I am cryptography expert now

#

Feels good

silent pier
#

to write a script to test my way down from 2**800, or just google it ThinkCorn

orchid notch
#

You want to find a prime?

silent pier
#

ay

#

Big prime for diffie hellmans key exchange

orchid notch
#

Generate random numbers in the range of numbers you want your prime to be in and use the miller rabin test on them until you find one

#

For 1024 bit primes around 40 rounds of miller rabin are recommended

#

So I guess that should be more than reasonable for you

upbeat palm
#

I'm Cryptography noob.

silent pier
#

does it matter how big the secrets are?

#

if i have a big p prime

#

and g i suppose matter, but im unsure how big these should be

native edge
#

dfh uses very very large primes that have been checked for safety

#

Like over a hundred digits large

orchid notch
#

Minimum or 2^1024 is recommended for p although depending on the duration of your connection you can choose smaller ones as the NFS method takes hours to crack an exchange

#

If you really want to be safe you gotta take more into consideration though

#

For example the prime factors of p-1

#

For g choose a number smaller than p which allows g^a mod p to result in as many numbers as possible (ideally all) between 1 and p-1

#

@silent pier

silent pier
#

Read g is usually 2

#

for most cases

orchid notch
#

Well then 2 appears to be the number which allows the most results in the range from 1 to p-1 for the above equation

silent pier
#

what about secret a and b? should they be completely random between 1 and n?

#

or have a specific size as well

#

couldnt find much om them

#

Other than examples with numbers below 100 🎟

orchid notch
#

random iirc

#

but like

#

huge random

upbeat palm
#

Random Key?πŸ€”

orchid notch
#

yes

upbeat palm
#

Oh,that would be kinda complicated,imo.

orchid notch
#

no

upbeat palm
#

Random Key for each ciphertext,right?

orchid notch
#

no

#

random keys for symmetrical key exchange

#

so one message gets transmitted

upbeat palm
#

Oh, I thought of something else.

silent pier
#

so like 2^512 huge?

lilac gulch
#

thats only a 512 bit key

silent pier
#

Private key~

#

but it's not some big corp security, just proof of concept really

violet notch
#

do you guys think taking a ethical hacker course is worth or are there better courses out there

orchid notch
#

no

better than what lol

violet notch
#

oh why is that>?

upbeat palm
#

@silent pier For PoC 512 is good.

upbeat palm
#

USBKill,one who gives a high voltage of electricity when plugged in PC?

violet notch
#

So like if someone was to try and use a ducky or something?

safe bear
#

Wasn't aware of usbkill until now, that's neat

#

I'm not at that level of paranoia (yet)

#

Good idea extending it to other interfaces commonly tampered

#

My systems are Windows 10 bare-metal with WSL + various Linux distros in VMs

#

Yeah, it's only going to work on the typical modern Linux distros

#

Yeah

#

I was playing around with those a month or two ago for a random project

#

They're pretty easy to do

#

Would be neat if could run as a Daemon in WSL

#

Can't recall if it's possible yet to get them to come up on boot yet though

#

I might take a look tomorrow at adding Windows functionality to this

#

Might simply be a matter of calling the right APIs through ctypes or whatever

#

Quick question though, why AGPL?

#

It's not going to be used over a network

#

Ah

#

Just more complexity than what you already have with GPL...I just put everything I do under MIT nowadays πŸ˜›

upbeat palm
#

@thorn obsidian Oh,sorry for that.
But great job dude.

#

Massachusetts Institute of TechnologyπŸ€”

safe bear
#

Yes, google "MIT License"

upbeat palm
#

Oh.

safe bear
#

It reduces complication and encourages sharing

#

So, stopped GPL'ing my stuff a few years back

upbeat palm
#

So the MIT license is used for making programs open source?

safe bear
#

KeePass and LastPass

#

Because I'm lazy and my setup works efficiently while still having adequate security

upbeat palm
#

You encrypted your database with AES-256,iirc.

safe bear
#

KeePass

upbeat palm
#

πŸ‘

north rover
#

KeePassXC because itβ€˜s pretty good

valid furnace
#

openssh is bad, they don't fit in with normal key procedures, don't allow x509 and implement their own garbage standards.

north rover
#

oookay

valid furnace
#

I've been working on a universal standard for people/companies to implement hardware security keys.

#

right now the biggest stick in my craw is that openssh doesn't seriously support x509 and I'm trying to figure how how to get it to work.

#

I'm probably going to be forced to make another CA with some weird implementation

#

but that's more hot garbage

#

thanks to openssh folks

upbeat palm
#

Certificate Authorization?πŸ€”

valid furnace
#

@thorn obsidian so get this, they wanted to avoid x509 for "unacceptable risk" basically, then go implement their own CA and ssh key mechanisms

#

@upbeat palm Certificate Authority

upbeat palm
#

Oh yeah,now I remember.
Thanks @valid furnace

valid furnace
#

basically it's unrealistic to be expected to keep a constant up to date list of every allowed/banned user on each of your 1000s of servers.
You simply put a company public key on each server that never changes.
Then any user who's "signed" by the company key will be allowed in.

upbeat palm
#

A type of constant key.

thorn obsidian
valid furnace
#

pretty sure this belongs in "anti-security"

#

or "assholes that don't know what security is"

upbeat palm
#

Plenty of people don't know what security is.

#

A Taiwanese guy challenged Mark Zuckerberg to hack his account and said he'll do it live.

thorn obsidian
#

lol

#

yeah

upbeat palm
#

The fact is "Facebook" is total insecure.

lusty flare
#

aw shit

#

hopefully that breach comes through into the HIBP db

#

if it's a serious one

upbeat palm
#

Which one?

lusty flare
#

the 50m breach for facebook

safe bear
#

I deactivated my Facebook beginning of May, but I don't think I deleted it fully... Need to do that now.

#

Not that it would matter, they still keep the data around for at least a year.

thorn obsidian
#

I don't think Facebook is really insecure

#

I'm pretty sure the website that handles my taxes in my country is full of critical security holes. It's just that noone cares to exploit them because it would be pointless

#

yet, people still use this website to pay their taxes

#

Ignorance is bliss : )

sick hawk
#

why would it be pointless?

thorn obsidian
#

because I come a country that noone cares about : )

#

My point is that Facebook is surely more secured than most website people use.

thorn obsidian
#

everyone cares about something

#

if it's got a security problem someone will hack it and sell the information

thorn obsidian
thorn obsidian
upbeat palm
#

Damn, I missed the Taiwanese guy challenge.
Any news on it? @thorn obsidian

thorn obsidian
#

nope, haven't heard anything

upbeat palm
#

Oh,okay.

upbeat palm
#

@thorn obsidian If I may ask where do you live?

thorn obsidian
#

In a beautiful country πŸ˜ƒ

upbeat palm
upbeat palm
#

50M data included his too.

thorn obsidian
#

Is there a technical details on the vulnerability?

safe bear
#

Not yet

lusty flare
#

fingers crossed that ends up in Troy Hunt's db

safe bear
#

If he can track it down

lusty flare
#

yeah

orchid notch
#

Why fingers crossed for that

lusty flare
#

i think the responsible thing for FB to do would actually be to disclose it

safe bear
#

I doubt Facebook is sharing enough to provide an anonymized list he can use

lusty flare
#

to him specifically

safe bear
#

Since iirc he uses hashed emails

lusty flare
#

HIBP is getting some serious grunt behind it

#

yeah

#

everything's hashed

safe bear
#

They might not be at the point yet in the investigation to know the full and precise scope of the breach

lusty flare
#

at least they shouldn't have to an equifax

thorn obsidian
#

I never mock companies when they have security flaws, because if I was the developper, there would be 10 times more πŸ˜ƒ

lusty flare
#

:D

upbeat palm
#

πŸ€”

upbeat palm
#

Yp.

thorn obsidian
#

πŸ˜ƒ

echo burrow
#

IT wasn't a password hack.

#

It had to do with session cookies that were static.

#

How such a feature could be implemented without a timeout is beyond comprehension.

lusty flare
#

okay but i'm more curious about what data was taken

thorn obsidian
#

github using pwned passwords now too, nice

#

people should use this ^

#

build it into stuff

upbeat palm
#

Yup.

thorn obsidian
thorn obsidian
#

Probably doesn’t even get passed down to the tech team

#

Lol

thorn obsidian
#

lol

lusty flare
#

oh @thorn obsidian

#

i saw someone was doing the NTLM hashes as a side project of their own

#

nice that it's integrated

thorn obsidian
#

you build in API calls or lookups to stop users from choosing dumb passwords

#

and regular dev is security related

#

fuck me i don't have time for this

lilac gulch
#

thats their problem then

#

you can say "Not our fault you picked a dumb password, we told you"

#

/shrug i dont do user support

native edge
#

disallow a list of the most common passwords

#

if it's a fixed salt it wouldn't be a problem

valid furnace
#

@thorn obsidian I want the raw database leaks so I can correlate metadata to deanonymize accounts.

#

but that's just me.

thorn obsidian
#

he doesn't release that on purpose lol

thorn obsidian
#

@thorn obsidian ok so i'm less busy and the stuff you were saying was dumb, so here

as a company it's your responsibility to protect users from security risks, both legally and ethically, so making sure your users don't use a password that is known to have been used before is something that they should be doing. It provides a very large security gain to users and stops credential stuffing, which is one of the most common attacks on people's accounts these days. Checking tens of millions of passwords is very fast, especially if you use the API he provides. The password database contains unsalted passwords so you just compare the plain password hash, and hash+salt when you store it in your own backend.

As for rate limiting, it's mostly ineffective since chances are very high that the user uses the same password on every site, so it will succeed on the first login anyway. IP based rate limits are almost useless, people can use any number of IPs and machines to brute force things, especially with IoT these days.

#

also lots of companies prevent password reuse, including github, EVE Online, and 1password

#

they all use the system built by troy hunt

upbeat palm
#

@thorn obsidian I guess that way we/you can prevent "bots" from trying hundred millions of password,but what if they use proxies?

#

Oh.

thorn obsidian
#

yes

upbeat palm
#

Either way,it won't last forever.

thorn obsidian
#

it's in the NIST standards

#

people should be doing this

#

yes

upbeat palm
#

Recpatcha is a good way to avoid bots.

#

What is preventing password reuse?

#

Oh.

#

When I was on telegram people use that old hit and try method to from their so called combos(combination of email and password like this afhzbhshh@gmail.com: password123),they use it with proxies and configuration file of a tool and test it on website like Spotify, Netflix etc. That way they earned a shitload of money.
Google password creator is good.

#

That's like comparing Krillin to Goku SSJ

lusty flare
#

hey i was scrolled up

#

but seriously

#

preventing users from using passwords already exposed in breaches

#

is a fucking brilliant idea

upbeat palm
#

Indeed it is.

#

Sometime paranoia is good.

lusty flare
#

Everything Xair has said is literally the best practice we could be doing right now

#

Just because you as a user are technically aware of the threats you face doesn't mean developers or even the company your work for shouldn't actively try to mitigate risk

#

and that's pretty much what this is

#

mitigating risk.

#

tbh now there's NTLM hashes i might see if i can convince work to let me deploy something to our client's environments

#

it would prevent some really dumb shit from happening

upbeat palm
#

+1

#

Even though there are so many ways to make secure things no one implement it.

lusty flare
#

i feel like there are bigger problems

#

people ignoring NIST and NCSC standards for no good reason

#

Biggest bitch of mine is not allowing pasting into password fields

upbeat palm
#

Biggest bitch of mine?

lusty flare
#

oh, biggest bitch = biggest complaint

#

:)

#

bitch being used to mean something that annoys me etc

upbeat palm
#

Oh, I'm not good at understanding puns.

lusty flare
#

it's more like a western turn of phrase

#

like if someone's complaining about something they're "bitching"

#

but also if something is actually really cool it's also "bitching"

#

like "Terry wouldn't stop bitching about how i burned his eggs."

#

but also "Terry said my eggs were really bitching!"

#

English is logically broken

upbeat palm
#

Oh, I'm gonna try it.

thorn obsidian
#

english is pretty memed

#

also yea not allowing pasting into a password field is the worst, anyone who won't allow that i just refuse to interact with tbh

#

my bank is the most insecure system that i currently use, which says a lot about security in companies

upbeat palm
#

No one thinks that the security will be going to be first priority of digital world in upcoming years.

chilly elk
#

Hi I just released my first big project which is a new penetration testing and exploitation framework. If you are interested in helping add some utilities and plugins feel free to make a PR or get in contact with me. I would really like this to be a community driven project and hope to make it much more usable and updated often! Need all the help I can get. Heres a link to the framework for now πŸ˜ƒ https://github.com/DarkSpiritz/DarkSpiritz

upbeat palm
#

Even if I want to I just can't.

chilly elk
#

@upbeat palm why not?

upbeat palm
#

I don't have any way to pull request, I can't use Git to pull request i.e. no PC.
But your project seems good.

native edge
#

Pull requests are done on the website

upbeat palm
#

I asked Nix and he said after pulling request I have to use Git.

#

And he said it'll be overcomplicated for me.

chilly elk
#

You can also just send them to me

#

any plugins you make

#

or just email and ill upload them myself πŸ˜ƒ

upbeat palm
#

Really?
Thanks. @chilly elk

#

I'm gonna work then.

chilly elk
#

sweet πŸ˜ƒ

#

appreciate it

#

youll be credited on the README and in the framework

upbeat palm
#

Oh.

chilly elk
#

what?

#

something wrong w that? what else would u like? @upbeat palm

upbeat palm
#

Nope,that's enough for me.
Thank you, I'll contribute to this project with all my potential.

chilly elk
#

thank you

thorn obsidian
#

@chilly elk what plugins are you looking for

chilly elk
#

@thorn obsidian anything you think would help with penetration testing

thorn obsidian
#

Not anything I can make haha

#

But good luck!

chilly elk
#

thanks

orchid notch
#

@upbeat palm its the other way round, in order to get to the point where you can create a PR you have to use git, the PR creation itself is done on the website

#

@chilly elk is there any particular reason you allow python only plugins? For example I wouldve already contributed to metasploit or at least tried to if it wasn't written in ruby, why not use a stdout stdin based plugin system like for example neovim so everyone can contribute in the language he is best at?

#

If there is nothing against it I would be willing to try and implement it together with a few plugins

upbeat palm
#

@orchid notch That's the reason I dropped the contributing idea.
You're right, I should work on my bot now.

orchid notch
#

I never said that

#

The last onr

upbeat palm
#

Yup, I said it.

chilly elk
#

@orchid notch well because its a python framework you can use the run() command from plugin_support to run shell code so if you wanted i dont see why you couldnt add your own scripts in whatever language to storage and just have the plugin run that

orchid notch
#

i see

#

thanks

#

in that case I'll add a plugin i have in mind soon β„’

chilly elk
#

sweet appreciate the support πŸ˜ƒ

thorn obsidian
orchid notch
#

alrighty

#

next PR is out for now so lets do dis

#

your installer is somewhat interesting

lilac gulch
#

oof

cedar pelican
#

@orchid notch where to you get the cool terminal layout?

#

just a arch feature?

orchid notch
#

powerline9k + config files

im on fedora atm

#

anyways

#

lets manually install dis

#

fun

#

this installer was sure written for some outdated fedora

#

this installer just destroyed my softlinks to python2

#

fkin hell

#

"fixing python2"

cedar pelican
#

@orchid notch does that work over ssh?

#

I'm guessing not

orchid notch
#

ofc not

#

its a prompt

cedar pelican
#

Yes cool

#

Well fuck you to then

#

;^)

orchid notch
#

i mean you could install it on the machine and configure it there.......

#

then it would work

cedar pelican
#

Its a virtual host

orchid notch
#

why is it installing telnetlib

#

that thing is in stdlib

#

this code is really damn old

#

lots of the packages its installing atm arent on pypi anymore

chilly elk
#

@orchid notch what Distro are you on?

orchid notch
#

fedora 28

chilly elk
#

is that dsf package manager?

orchid notch
#

dnf

#

yes

chilly elk
#

dny badf yeah m

#

i meant dnf

orchid notch
#

but all the packages its installing are outdated/not in the repos anymore /already fixed it btw

#

and the pip packages

chilly elk
#

ok

orchid notch
#

lots of them are either not their or in stdlib already

chilly elk
#

it works fine on ubuntu and arch

#

and debian

#

maybe its just the fedora

#

weir

#

thank you btw

#

did u look at the installer script

#

and figure out what was broken

orchid notch
#

i mean

#

im assuming i have to run this under python3?

#

oh nice internet lag

#

wooop

chilly elk
#

its python2

#

so idk why you would do that

orchid notch
#

wait no

#

i wanted to write 2

#

i executed it under 2

chilly elk
orchid notch
#

misstyped

chilly elk
#

all good

orchid notch
#

im touch typing from a 60 degree side angle

#

hard to hit numbers correctly 😐

chilly elk
#

oh boy

#

why the angle of attack lmao

#

60 degree

orchid notch
#

uh

#

fedora on laptop

#

next to me windows pc because im doing word stuff

#

so laptop goes left to the screen

chilly elk
#

ah i see

orchid notch
#

fun

#

so once i chose an exploit for example, how am i supposed to configure it

chilly elk
#

ill try installing a fedora VM to see if i can fix

#

well you configure it as you would with metasploit

#

use the 'retarget' command

#

which will allow you to go through the config and change each value

orchid notch
#

"Unknown syntax: retarget"

chilly elk
#

atm im working on a way to add values without manually changing config.xml

orchid notch
#

you sure?

chilly elk
#

im guessing you already used use

orchid notch
#

yes

chilly elk
#

if so type back

#

and then retarget

#

you have to retarget from within the main framework not inside of an exploit

orchid notch
#

wait so

#

every exploit gets all the variables etc passed

chilly elk
#

only if they call for the

#

them*

#

but they can use any value from config.xml

#

so say they want the target

#

it would be

#

ask.target

#

say they want LHOST

#

it would be ask.LHOST

#

using plugin_support

orchid notch
#

ok

chilly elk
#

theres an example plugin there

#

you can see how the ask feature works

orchid notch
#

oooh

#

a wiki

#

didnt see that one

chilly elk
#

yeah i still have to work on it but ill add as ds grows

orchid notch
#

alright

#

so as i used it recently in a theoretical attack on a web page ill port this drupalgeddon2 ruby script to python now i guess

#

yay ruby

chilly elk
#

i suck with ruby lol

#

which is why this is python

orchid notch
#

never even wrote ruby

#

gwyn is good with ruby, ill just ask her if i have questions i guess

chilly elk
#

you can do anything in python that u can w ruby

#

just using diff methods

orchid notch
#

yeah i know

chilly elk
#

also try to refrain from using raw input

orchid notch
#

but the ruby syntax

chilly elk
#

just because we would like to be able to just pull from config settings

orchid notch
#

diamond operator for example

#

<>

#

==

#

!=

chilly elk
#

Β―_(ツ)_/Β―

#

try not to use print as well

#

if you can use text(), success(), fail(), and warning()

orchid notch
#

yeah seen it

#

luckily enough this is well documented ruby so it should be easy to port

#

i hope

chilly elk
#

i was going to try and port over somethings from PTF but its all weird

#

it basically just downloads the tool and runs it as command line

orchid notch
#

and for the python2 dependencies you might want to move them to a requirements.txt file?

chilly elk
#

yeah i just cant be bothered to pip freeze

#

and pipreqs is py3 only for somereason

orchid notch
#

pipfile?

chilly elk
#

whats that

#

@orchid notch going to work on a new installer

orchid notch
#

pipfile is this new standard used by pipenv

#

not sure if it likes python 2.7 though

chilly elk
#

oh

#

well i fixed the install script

#

go ahead and type reload it should fix @orchid notch

orchid notch
#

im running on a forked version

#

wouldnt it be better to update from remote and stuff?

chilly elk
#

well its assuming you followed the getting started instructions and cloned from the repo

#

i dont have a server to be able to host

thorn obsidian
orchid notch
#

to be fair

#

lots of those pages are in china

thorn obsidian
#

yea, and china is dumb

#

but lots of them aren't china too

tidal oasis
#

china is very far from dumb, naive to say

tawdry hornet
#

Hey guys. I've just started to learn source control and I've written a basic program.

#

I need to use API keys in this code, so I've put the keys in a dotenv file and added that to my gitignore.

#

And I'm using python-dotenv to pull in the variables.

#

Is that prudent or should I be doing something better.

#

When I move this onto AWS serverless infrastructure I'll be using AWs Secrets Manager and a API private key stored in s3.

tidal oasis
#

that's fine

chilly elk
lean skiff
#

here's a CTF challenge

#

Tip - There's a reason it's a .txt and not .asm file.

upbeat palm
#

You made it on your own​?

safe bear
#

lmao

#

I never realized there were Wi-Fi numbers

#

I just always knew them as 802.11x

#

ax is new to me tho

#

and apparently they're skipping over ad

#

which is 60ghz

upbeat palm
#

Article says ax going to be the fastest, skipping over ad?

safe bear
#

802.11ad

upbeat palm
#

Oh.

lean skiff
#

@upbeat palm yes

upbeat palm
#

@lean skiff Looks good.

lusty flare
#

so many wifi letters

#

it's hard to keep track

#

a, b, g, n, ac, ad, af, ah, ai, aj, aq, ax, ay

#

plus the 2007, 2012 and 2016's

#

lol, they're calling ax "WiFi 6"

#

and yeah @safe beari think they're skipping over ad because other technological improvements happened

#

that were more significant i guess

#

802.11ay will be 60ghz again though

#

peak transmission of 20gbps apparently :o

upbeat palm
#

Can't do anything.

upbeat palm
#

Peak transmission is 20gbps,damn.

thorn obsidian
#

What’s this ?

lusty flare
#

WiFi standards

#

802.11ay supposed has 20gbps peak transmission

tight abyss
#

ayy

upbeat palm
#

@lean skiff Is it a reverse engineering challenge?

thorn obsidian
#

so its about hacking

#

lol

#

i wanna become a pro hacker

lusty flare
#

They're called security researchers

upbeat palm
#

Kind of,it's related to wireless security.
I want to become security engineer.
Checkout the above CTF.

lusty flare
#

and it's more boring than you think

upbeat palm
#

Yup.

lusty flare
#

pen testing is a subset of security researcher and it comes with a hell of a lot of paperwork

upbeat palm
#

Yup,yup and yup.
Sometimes it can be boring and sometimes it can be challenging.

thorn obsidian
#

You know,I know a guy who did this hacking competion thing where he had to hack into some computer or something and he won,now he's in the MI5 or MI6 whatever it is.

upbeat palm
#

You mean CTFs at DEFCON?

lusty flare
#

MI5/6 don't employ people off of competitions alone o_O

#

He was probably a solid researcher already

upbeat palm
#

MI?πŸ€”

thorn obsidian
#

Well idk lol

lusty flare
#

The UK intelligence services Robin

upbeat palm
#

OMG.

thorn obsidian
#

But he did get into mI something from knowing how to "hack"

upbeat palm
#

India doesn't have a intelligence service, afaik.

lusty flare
#

Yeah you do

#

All countries do

#

pretty much

thorn obsidian
#

your indian? @upbeat palm

lusty flare
#

The Indian international intelligence agency is called "R&AW"

upbeat palm
#

But I guess it's confidential.
Someone hacked(a government website) and posted Doraemon photo.
Yup.

#

Yup, Research and Analysis Wing.

thorn obsidian
#

Anyways could some of you guys like hack discord n stuff??

upbeat palm
#

Hack discord and stuff?

lusty flare
#

Errr, probably not.

thorn obsidian
#

Yes like are you pro hackers?

lusty flare
#

Security really isn't as exciting as you think

thorn obsidian
#

Should i watch out whaty i say or will a bullet will go through my window in next 30mins?

lusty flare
#

I don't specifically work in security but I do secure networks / systems for a company

#

And just yesterday i had to prove to a bank that a client wasn't hacked

thorn obsidian
#

BUT HE WAS

#

HEHE

lusty flare
#

Erm, no.

#

It was a fraud investigation and the write up was boring

upbeat palm
#

If were one, I should've been hacking something right now.But I need to learn a lot i.e. Cryptography(learning now) after that networking then reverse engineering etc.

lusty flare
#

Like 2-3 pages of A4 explaining why the specific fraud couldn't have occured resulting from a data breach

#

After i did meticulous evidence gathering

thorn obsidian
#

omfg

#

i cant write 1 page at school

lusty flare
#

Good luck working in IT.

#

:P

lean skiff
#

@upbeat palm crypto

thorn obsidian
#

im doing ITC so like html etc

upbeat palm
#

Security involves lot of writing and communication.

#

@lean skiff Looks good.

lusty flare
#

Pretty sure the C stands for communication in that

#

Β¬_Β¬

silent pier
#

Hacking software like discord is really not something this channel is for. Keep it clean please

lusty flare
#

^

thorn obsidian
#

Sorry b

lusty flare
#

Also it's a super dumb thing to even try to do.

thorn obsidian
#

How come?

lusty flare
#

It's illegal and what do you even expect to gain out of it even if you succeed?

#

A crap load of login credentials that you then have to get rid of somehow?

thorn obsidian
#

yes

native edge
#

A bunch of hackers just go caught in my country

thorn obsidian
#

where u from

native edge
#

netherlands

thorn obsidian
#

do you smoke weed?

native edge
#

They were a group of russians trying to steal toxic gass

#

No

#

Weed is illegal here

thorn obsidian
#

IS IT?

#

Sorry off topic

upbeat palm
#

Recently Korea Hacking team came into the show.
They tried to hack world bank.

lusty flare
#

APT8 or whatever

#

North Korea have apparently been breaking into a lot of national banks recently

#

for smaller nations

upbeat palm
#

Google security engineers are awesome.
Extraordinary minds.

#

@lusty flare Yup,in your country?

lusty flare
#

Hell no.

#

The UK has a fairly robust banking sector for now. ;)

upbeat palm
#

I always want to visit UK for vacation, will visit after getting job.

thorn obsidian
#

Robin it's pretty boring unless you go to london but that is wayy too busy for my liking.

lusty flare
#

Cardiff is a nice place. Plus there's lots of historic stuff to see all over the country.

#

It's not all down in London ;)

thorn obsidian
#

Well if you like historic things go to Nottingham(home town BIG UP) see like robin hood,castle,museum,some caves(more like museum)

upbeat palm
upbeat palm
thorn obsidian
#

ermm

upbeat palm
#

Tip - There's a reason it's a .txt and not .asm file.

thorn obsidian
#

i'd rather not download it

upbeat palm
#

πŸ˜•

thorn obsidian
#

i dont get it

upbeat palm
#

It's not a virus/worm/trojan dude,it's a CTF.

thorn obsidian
#

i downloaded it

#

but idk what it is

#

00000001 27 DAA
00000002 60 PUSHA
00000003 5F POP EDI
00000004 4D DEC EBP
00000005 2338 AND EDI,DWORD PTR [EAX]
00000007 6E OUTS DX,BYTE PTR [ESI]
00000008 3C7D CMP AL,7D
0000000A 7C46 JL 00000052
0000000C 45 INC EBP
0000000D 56 PUSH ESI
0000000E 305353 XOR BYTE PTR [EBX+53],DL
00000011 64743E JE 00000052
00000014 722F JB 00000045
00000016 6F OUTS DX,DWORD PTR [ESI]
00000017 4B DEC EBX
00000018 4B DEC EBX
00000019 256C472234 AND EAX,3422476C
0000001E 7E67 JLE 00000087
00000020 317B63 XOR DWORD PTR [EBX+63],EDI
00000023 636161 ARPL WORD PTR [ECX+61],SP
00000026 762A JBE 00000052
00000028 294C7877 SUB DWORD PTR [EAX+EDI*2+77],ECX
00

#

wtf is that

upbeat palm
#

How are you going to be a pro hacker then?πŸ€”

lusty flare
#

that's assembly

thorn obsidian
#

idk

#

its just numbers and letters

upbeat palm
#

Yup.

lusty flare
#

I got a great book on ASM

#

It's from like the 90's

#

boss gave it to me

upbeat palm
#

Oh,man
I want to learn assembly but it's freaking complicated.

lusty flare
#

that's why i haven't read the book

#

Β¬_Β¬

thorn obsidian
#

it's easy asf

upbeat palm
#

tears of blood
Wonder if it was.

thorn obsidian
#

0000004A 58 POP EAX this means that is a assembly of POP EAX and POP EAX is 1512

#

Easy

upbeat palm
#

πŸ‘

#

Solve it and do a write-up.

thorn obsidian
#

ok

#
00000001 27                              DAA
00000002 60                              PUSHA
00000003 5F                              POP EDI
00000004 4D                              DEC EBP
00000005 2338                            AND EDI,DWORD PTR [EAX]
00000007 6E                              OUTS DX,BYTE PTR [ESI]
00000008 3C7D                            CMP AL,7D
0000000A 7C46                            JL 00000052
0000000C 45                              INC EBP
0000000D 56                              PUSH ESI
0000000E 305353                          XOR BYTE PTR [EBX+53],DL
00000011 64743E                          JE 00000052
00000014 722F                            JB 00000045
00000016 6F                              OUTS DX,DWORD PTR [ESI]
00000017 4B                              DEC EBX
00000018 4B                              DEC EBX
00000019 256C472234                      AND EAX,3422476C
``` These mean bob is going bankrupt becuse he lost 159313Β£ and he only has 50003$
#

dun

upbeat palm
#

What the πŸ˜•

thorn obsidian
#

yh ikr i was confused at the start

upbeat palm
#

Tag the creator of this CTF.

thorn obsidian
#

me?

upbeat palm
#

LappySheep.

thorn obsidian
#

@lean skiff

#

ok

#

done

#

am i getting hacked now?

upbeat palm
#

Where is flag?πŸ€”

thorn obsidian
#

upstairs right room

lusty flare
#

Taking the piss is a great way to not get taken seriously

thorn obsidian
#

Sorry?

upbeat palm
#

I'm out now.
I can't take this anymore.

lusty flare
#

Same.

thorn obsidian
#

Same.

orchid notch
#

what is going on here???

thorn obsidian
#

just teaching some CTF

upbeat palm
#

@orchid notch Dude,there is a crypto CTF,see if you can solve it or not.

orchid notch
#

where when what

upbeat palm
#

What should I explain first?
Where?
When? or
What?

#

See above chats.

orchid notch
#

scrolling

#

roles eyes

#

is it that asm file

lusty flare
#

yes

orchid notch
#

and whats the challenge?

thorn obsidian
#

its pretty easy tbh

orchid notch
#

if there is no challenge its not easy

lusty flare
#

Well I think the guy was being cryptic in saying it's a .txt file not an ASM for a reason

#

idk what that reason is

upbeat palm
#

Same.

#

@thorn obsidian Solve it then.

thorn obsidian
#

i alreeady did

upbeat palm
#

Oh,yeah.

#

If none of us will be able to solve this, I'll ask for a write up from that guy.

lean skiff
#

@thorn obsidian hi yes

#

i was pinged

thorn obsidian
#

I got told too ping u by @upbeat palm

#

not sure why

lean skiff
#

i can give another hint

upbeat palm
#

That's a good thing.

lean skiff
#

tip - the offsets are very important

upbeat palm
#

O_o

#

@lean skiff One thing,the reason it is not .asm file is because it can't compiled?πŸ€”

lean skiff
#

no

upbeat palm
#

Gotta say,you did a good work on it. @lean skiff

lean skiff
#

thank

#

this was a mean challenge tbh

#

i wont be surprised if no one does it

upbeat palm
#

πŸ˜‚

#

I'm a beginner (most of us here), don't expect much.

lean skiff
#

oh thats fine

thorn obsidian
#

no me a pro

#

i solved

lusty flare
#

You know the topical channels are used for topical chat and not just dicking about, right?

upbeat palm
#

I'm done with this challenge, should I ask for a write up or you guys are solving?

upbeat palm
#

That's a good info, thanks @valid furnace

valid furnace
#

The illicit chips could do all this because they were connected to the baseboard management controller, a kind of superchip that administrators use to remotely log in to problematic servers, giving them access to the most sensitive code even on machines that have crashed or are turned off.

#

BMC modification

#

fucking evil

lusty flare
#

oh

#

DRAC type stuff

valid furnace
#

as I understand it, forging microchips in a way that they wind up on computer motherboards and allow remote attacks

lusty flare
#

You're aware of what DRACs do?

valid furnace
#

nope

lusty flare
#

There's a similar flaw posted here earlier i think about flaws in Dell's iDRAC

#

Well BMC's have their dirty little fingers in almost every part of a server

#

Meaning that you can completely control stuff through the management port

#

Including full OS re-installs etc etc

valid furnace
#

OH, yeah, of course

lusty flare
#

So being able to get into the BMC allows you to have total control of the server

#

through any OS reinstall

valid furnace
#

management ports on servers. I tend to leave them disconnected

#

but I don't typically deal with that scale.

lusty flare
#

Well, you can't really do that if you've got a lot of shit to manage

#

Or if you've got a server in someone elses building

valid furnace
#

sure.

lusty flare
#

Usually the management networks are completely closed

#

but if a sys admin gets popped they might be connected to the management network also

valid furnace
#

it allows you to remotely access the monitor, start it, shutit down, access other control features

lusty flare
#

well, less so access the monitor

valid furnace
#

direct access to the machine basically.

lusty flare
#

it's more like a router's web panel

#

you're thinking of Network KVMs

valid furnace
#

sure, my servers have a remote console that allows me to access the video

#

through the BMC

lusty flare
#

i dunno how advanced they've got now, but last time i messed with Dell's iDRAC it was all shells and web panels

valid furnace
#

oh yeah, it's full on video rendering in browser.

lusty flare
#

Nifty

#

Anyway

#

If you can exploit a BMC you've pretty much got persistence

#

and you can't really audit the BMC

#

except by monitoring traffic on the management network itself

valid furnace
#

yeah. :/

lusty flare
#

It's a similar issue to most firmware type persistence

#

There's not really AV for firmware

#

Closest we have iirc is stuff like TPM to check integrity

#

but in many cases that's poorly implemented and allows for some dirty tricks with BIOS exploits

#

That sort of attack is going to be hella rare though

#

super targeted super nation-state

upbeat palm
#

In a nutshell,it'll give full access to it,man security indeed requires a lot of brainf*cking.

#

For making BIOS exploits , I need to borrow your assembly book ,Bisk.

lusty flare
#

;D

lean skiff
#

@upbeat palm I cannot provide you with the writeup yet

#

as the challenge is still open on a different server

#

once the challenge is completed on the main server either the completer or I will publish the writeup

thorn obsidian
#

whats a writeup? @lean skiff

lusty flare
#

It's where you write things up about what you did to do the thing.

#

A.k.a. a report.

#

Which is.... as I've said before... A shit load of what security research (HACKING) is.

tepid tundra
#

Holy shit that’s insane

#

And also wow they must be smart af

#

Like literal geniuses

valid furnace
#

@lusty flare oh, also, I figured I should tell you the full major features of current BMCs
You can fully remotely:

  • Attach USB/CD Drives or load ISOs
  • view the vga/screen console and access keyboard/mouse
  • control the server power functions, monitor some things

That's the jest. You don't need to sit in front of a server to set it up or wipe it. You can manage them all remotely entirely.

#

automatic boot, automatic deployment, automatic setup, automatic power management

lusty flare
#

I'm aware of what they do

#

It's my job

#

The VGA thing is new to me, to be fair.

valid furnace
#

ah sorry. πŸ˜‰

upbeat palm
#

@lean skiff Oh,no problem but ping me when you'll provide write up.

#

Lord Bisk is indeed the Lord of networking here.

lusty flare
#

eh, don't say that

#

people will raise their expectations of me

#

that's a tricky position to hold

#

;D

upbeat palm
#

Don't know about other, but I'm the one.
:P

#

@tepid tundra Yup.

upbeat palm
#

There are two Scott?
Ransomware is most common cyber attacks these days.

safe bear
#

Wi-Fi Alliance may have skipped over ad, but IEEE didn't

#

Hence the existence of 802.11ad

#

The whole SuperMicro thing smells fishy since all three parties, including the two impacted, actively denied it

#

Which as was mentioned on Ars Technica, is not what you'd normally see if they were simply under a gag order

#

iDRACs are handy

#

Obviously, you put them on a separate network with a different set of security controls (read: much stronger)

upbeat palm
#

802.11ad is the fastest as of now.

safe bear
#

Yes

#

Also the lowest range since 60ghz

upbeat palm
#

Yup,and kinda expensive too.
I guess you did some research on it,right?

safe bear
#

No

thorn obsidian
#

lol

#

i mean, that seems crazy

#

they'd have trouble going through people, like it would distort the signal when you walk past someone LOL

fervent patio
#

stop breathing, my video is buffering!

thorn obsidian
#

literally yes

safe bear
#

It's intended for small spaces, like a living room, conference room, office, FBI surveillance van, etc.

#

Which is not a whole lot, and it rather reduces mobility

#

I'm quite experienced with this

fervent patio
#

i would have ethernet to my phone and tablet if i could tbh. fuck wi-fi :D

safe bear
#

I've definitely had 3 ethernet connections to the same laptop on multiple occasions, and possibly 4 once sometime

#

One

#

And two USB-Ethernet adapters

#

And I think they were either directly mapped or bridged into VMs

#

All told I probably have close to a dozen USB-ethernet adapters at this point

#

They're so handy

safe bear
#

Nope Windows

#

VMs are usually Kali or a Ubuntu devbox or whatever

upbeat palm
#

So much VMs he can't even remember the names.

safe bear
#

Yes actually

#

Which is annoying when I forget what computer a VM is on

#

Wish I could just magically sync everything

lusty flare
#

USB ethernet is πŸ˜™ πŸ‘Œ

#

hardest part is keeping track of all the networks

#

my work PC is on 3 different networks

upbeat palm
#

Damn.

#

@lean skiff Is that challenge over?πŸ€”

#

By track you mean network traffic?

lusty flare
#

yeah, making sure you don't flow stuff in the wrong place

upbeat palm
#

Oh, gotcha.

#

BTW have you ever used Vega or Burpsuite?

lusty flare
#

nope

lean skiff
#

@upbeat palm no

#

its open until its completed

upbeat palm
#

πŸ˜–
There's no time limit or something?

safe bear
#

Those are web app exploit tools, know of but haven't used

lean skiff
#

@upbeat palm no

#

my most recent "long and difficult challenge" lasted a few weeks i think

inland oyster
#

would anyone be able to explain how encrypting and decrypting using integers works in further detail? my teacher has not explained it to where i can understand it.

lean skiff
#

@inland oyster using integers as in

#

the integer is to be encrypted/decrypted

inland oyster
#

yes

lean skiff
#

or the integer is used in the encryption

#

oh

#

that makes more sense

inland oyster
#

using modulo

lean skiff
#

I'm assuming you're talking about the RSA encryption/decryption process?

inland oyster
#

i don't know what RSA is

lean skiff
#

or a variation/derivative of it

#

RSA is an asymmetric-key/password method of encrypting data

inland oyster
#

def encrypt(data):
newStr=""
for i in data:
i=data(i)
newStr+=i%10+7
return data

lean skiff
#

by using the fact that large primes are hard to decompose

#

i don't understand why it would be modulo before adding

inland oyster
#

thats what i did

#

not the teacher

lean skiff
#

if the list is 10 long and you add 7 to 5, you get 12 which is still over the 10 limit

#

it needs to be adding first

#

i'm assuming from the code that there's a list of 10 items

#

oh right because its a digit

#

lmao

#

okay

#

so

#

you need to add 7 before modulo-10-ing it

#

or actually

#

all you have to do

#

is instead of using modulo

#

just

#

1 sec

inland oyster
#

35%10 = 5.

#

is basically what the teacher wants us to use

lean skiff
#

yes

#

a modulo b = ((a/b)-(a//b))*b

#

35 % 10 = 35 / 10 - 35//10 * 10 = (3.5 - 3)*10 = 5

#

you are getting the remainder from a division

inland oyster
#

yeah i understand that process but putting it together in the code is where i struggle

#

'

lean skiff
#

and you dont need to use modulo if you have the digits

#

because all you have to do is read the least significant digit

#

aka the units value

#

if the number is 14

#

adding 7 gives 21

#

and reading the last digit is 1

#

so using this method you can skip a cycle

orchid notch
#

are we discussing encryptions?

lean skiff
#

not even encryption tbh

#

i wouldn't call this an encryption

orchid notch
#

im seeing RSA there

safe bear
#

Do you just have a script subscribed to the word "RSA" in this server Nix?

lean skiff
#
def encrypt(data):
    final_string = ""
    for character in data:
        integer = int(character)
        new_integer = ( integer + 7 ) % 10
        new_string = str(new_integer)
        final_string += new_string
    return final_string
orchid notch
#

no

#

i just came back from dinner

lean skiff
#

you want the addition before the modulus operator

orchid notch
#

and saw oh people are writing in security

safe bear
#

Umm hmm

orchid notch
#

and then i saw modulo

lean skiff
#

since the modulus operator is what is required to make sure it doesn't go out of bounds

orchid notch
#

and then i thought well modulo is quite intersting when it comes to encryption lets read up on history

lean skiff
#

if you modulo first before addition, out-of-bounds is still possible

#

also if you really wanted a good method of encryption

#

you should look up on modular exponentiation

#

used in prime-decomposition related encryption methods like RSA and PGP (iirc?)

orchid notch
#

yes

#

well

lean skiff
#

cool i'm not stupid then

orchid notch
#

PGP isnt an encrypt method

lean skiff
#

well

inland oyster
#

thats deep πŸ˜›

orchid notch
#

its a collection of ciphers (including RSA)

lean skiff
#

PGP uses 2048bit RSA though methought

#

or OpenPGP anyway

orchid notch
#

but there are more ways than prime stuff to do good encryption

lean skiff
#

@inland oyster if you really want to you can add a cryptographically pseudorandom key generator

orchid notch
#

for example Substitution Permutation Networks

#

like AES

lean skiff
#

which runs through the string and encrypts each with a different digit

#

which is better imo

orchid notch
#

that would result in a really long key though

lean skiff
#

not really

#

you could define an encryption standard and set a salt for a key before running it through

inland oyster
#

all they're asking for is a 4 digit number to convert to another 4 digit number using modulo and print it to you

orchid notch
#

if it comes to modern symmetrical encryption the majority relies on some block cipher nowdays

#

oh we're not really talking encryption then

lean skiff
#

mhm

orchid notch
#

sad

lean skiff
#

that's what i said earlier smh

inland oyster
#

lol

lean skiff
#

@orchid notch also just curious

#

did you have a go at my CTF challenge

orchid notch
#

i looked at it and had some thoughts but i eventually decided that the war with word over the colorisation of my encryption paper thingy for school and now my latex table war for the same thing because i gave word up because of the color problems might be more importnat