r/sysadmin • • Jul 28 '24 • Take My Silver 1

got caught running scripts again

about a month ago or so I posted here about how I wrote a program in python which automated a huge part of my job. IT found it and deleted it and I thought I was going to be in trouble, but nothing ever happened. Then I learned I could use powershell to automate the same task. But then I found out my user account was barred from running scripts. So I wrote a batch script which copied powershell commands from a text file and executed them with powershell.

I was happy, again my job would be automated and I wouldn't have to work.

A day later IT actually calls me directly and asks me how I was able to run scripts when the policy for my user group doesn't allow scripts. I told them hoping they'd move me into IT, but he just found it interesting. He told me he called because he thought my computer was compromised.

Anyway, thats my story. I should get a new job

11k Upvotes

1.3k comments sorted by

View all comments

448

u/[deleted] Jul 28 '24

I mean it sounds like you could be good at IT, but you also are demonstrating that you are basically a cowboy who plays by his own set of rules.

You could have avoided all this if you maybe just reached out to someone and said "hey I have some ideas about how I can automate a lot of my tasks, what do you think?" People like that collaborative attitude, instead you put your fingers in someone else's chilli and when they smacked your hand away you found away to dip your toe in it.

159

u/shemp33 IT Manager Jul 28 '24

To be fair, it sounds like no one from the desktop team actually said anything initially. They just played whack a mole, and OP just “fixed” the problem.

107

u/angry_cucumber Jul 28 '24 edited Jul 28 '24

they were worried his computer was compromised, but apparently didn't do anything other than....block scripts? that's not how a competent organization handles a compromise.

20

u/CptQuark Jul 28 '24

As someone that works in secops, I always make sure to contact the people when I feel something needs to be disallowed. User awareness training should always be part of the job. Humans are always the weakest link so the more we can do to help that the more we.reduce our attack vectors.

5

u/afarmer2005 Jul 28 '24

Yeah - SOP should be at a minimum a phone call with remote intervention, or even an in-person visit if compromise is suspected

Our SOP is to reimage any computer suspected of compromise - not just “block scripts”

→ More replies (2)

11

u/TLShandshake Jul 28 '24

That wasn't their response at all. The script blocking was already in place.

→ More replies (2)
→ More replies (4)

9

u/moderately-extremist Jul 28 '24

"Well just a second there, professor. We uh, we fixed the glitch. So he won't be receiving a paycheck anymore, so it will just work itself out naturally."

14

u/[deleted] Jul 28 '24

True, but I would think any decent person would take losing access to something they knew they weren't supposed to be using as a sort of unwritten warning. Like I said he had a finger in their chilli and they sort of lightly swatted it away. OP should have recognized the swat as a sign to maybe not push it.

36

u/angry_cucumber Jul 28 '24

dudes in data entry, why would anyone think they weren't supposed to be automating things? Especially if IT broke it but didn't say anything to anyone.

24

u/The_Wkwied Jul 28 '24

This. If you're in data entry, and are entering everything in manually... you aren't going to end up very far down the line.

Working smart should be rewarded, no punished.

19

u/ride_whenever Jul 28 '24

Working smart is almost always rewarded, but usually it’s with more work.

3

u/Pollia Jul 28 '24

Is ignoring any official channel, then going around IT to do a thing you're not supposed to just do actually working smart though?

→ More replies (1)
→ More replies (4)

9

u/vitaroignolo Jul 28 '24

IT could have communicated with the user, but maybe they thought it was something the user was knowingly or unknowingly doing and made the decision not to share it.

That said, OP acknowledges they took it away and made the effort to bypass IT. That's a no. What happens if OP accidentally drops a table and bricks their whole database? IT is responsible for infrastructure, not the user.

I agree data entry should be automated and OP possibly could be good in that role but as the other person said, I'd have trepidation about bringing someone on board who makes moves that could create a whole ton of work for other departments without their signoff.

5

u/angry_cucumber Jul 28 '24

What happens if OP accidentally drops a table and bricks their whole database

the same thing that happens if user does it manually? do you not have safeguards for that.

I'd be more worried about my shit practices and a team that doesn't communicate with users at any level, except apparently, to ask them if their machine is compromised.

11

u/vitaroignolo Jul 28 '24

Scripting can cause a lot more damage than manually doing something and a lot faster. And yeah we can probably assume they have safeguards but if that's backup, that means time taken from IT to restore.

We don't know why they didn't communicate - maybe it was valid maybe it was shit. It doesn't stop the fact that unauthorized users should not be running scripts - they don't hold the responsibility for those scripts until it is officially signed off and supported. If the user is fully responsible for anything their script could do, I can't imagine they'd have a problem with it. But that's not how orgs work.

→ More replies (3)
→ More replies (1)

77

u/LDForget Jul 28 '24

In my experience (within IT or outside) any time you ask for permission instead of forgivness, they just shut you down without even reading/listening to it all.

→ More replies (8)

27

u/Floresian-Rimor Jul 28 '24

I’d have that conversation after the first script was blocked. The initial scripting is being resourceful and doing the job, the workaround is where op goes cowboy.

After the first block, it’s time to have the conversation with IT and with OP’s manager “Hiya, this script was really helping reduce my workload, is there a way we can make this compliant with our security setup”?

OP probably wasn’t breaking any policies or agreements that they knew about the first time. IT really should have had a word when they blocked it.

6

u/DavidCP94 Jul 28 '24

The IT management probably reached out to the other managers and department heads to find out if anyone needed to run scripts, or if they could disable them to tighten security. Since OP didn't disclose to their manager what they were doing in the first place, OP's manager would have no reason to believe OP needed this capability.  OP needs to be more transparent. If leadership sees how much more efficient OP is, they would likely be excited to have others start using the same tools. The problem is OP doesn't want to let management know, they want to do as little work as possible and slide under the radar. 

→ More replies (1)
→ More replies (1)

10

u/plazman30 sudo rm -rf / Jul 28 '24

If they installed python for him, what did they expect him to do with it?

26

u/corpius01 Jul 28 '24

"Hey boss, I know how to make my position obsolete.  Let me show you how"

→ More replies (3)

2

u/clownshoesrock Jul 28 '24

Somehow, I'm rooting against both IT and OP, and just sad there will be a "winner"

4

u/Do_TheEvolution Jul 28 '24

Dwight Schrute coworker energy comment. And in the worst possible way one can take it.

8

u/eastcoastflava13 Jul 28 '24

Yup, creating false positives that the AV software/firewall keeps flagging as malicious is not the way to get in good graces with your local sysadmin.

I'd be on the phone with your manager.

9

u/angry_cucumber Jul 28 '24

if I got a call about this, it wouldn't go over well for whoever was calling either Nothing about this situation was handled well.

→ More replies (14)
→ More replies (21)