.

How useful is scripting compared to programming?

<<

uperkurk

Newbie
Newbie

Posts: 13

Joined: Wed Sep 21, 2011 9:25 pm

Post Fri Sep 23, 2011 6:55 am

How useful is scripting compared to programming?

I'll be totally honest upfront I dont really know what im talking about but my idea of making a script is like a peice of code that when injected into a website, makes the website return something, grant access or something like that.

Can someone tell me which is a good scripting language for exploiting websites? I know it has to be a web based language but everywhere I see perl and python.

I thought these were programming languages used to develop full on programs wereas scripting languages are not as large as programming languages
<<

Triban

User avatar

Hero Member
Hero Member

Posts: 620

Joined: Fri Feb 19, 2010 4:17 pm

Post Fri Sep 23, 2011 7:55 am

Re: How useful is scripting compared to programming?

I guess the easiest explanation is that a script requires a way to run and a program has been compiled to run.  It can sort of stand on its own.  Its easier to change a script than it is to change a program.  Also you can just dump any old script against a website, it really depends on what is running that site.  For instance you can't inject a vbscript if there is no way to tell the webserver to run it.  The cogs of the machine determine what tools you use and that comes with clever recon of that site.  Much of what is used is used to help the pen tester in launching attacks against the site based on the vulnerabilities that are found, i.e. SQL injection if it is discovered that the site uses an SQL server somewhere in the background to store information.  If the site runs PHP, there are ways to determine what versions are in use and run attacks based on known vulnerabilities. 

Of course this should only be done with the written consent of the client and you should never use this knowledge to play on sites you don't own. 
Certs: GCWN
(@)Dewser
<<

uperkurk

Newbie
Newbie

Posts: 13

Joined: Wed Sep 21, 2011 9:25 pm

Post Fri Sep 23, 2011 8:23 am

Re: How useful is scripting compared to programming?

Ofcourse not. But doesnt the website have to be using php for you to run a php script on it?


I remember a website along time ago called milworm that had a database full of exploits, some written in python, some written in perl and some other languages.

I guess its because ive never done any scripting I dont really get why is is used and what for.
<<

lorddicranius

User avatar

Sr. Member
Sr. Member

Posts: 448

Joined: Thu Mar 03, 2011 3:54 am

Post Fri Sep 23, 2011 9:38 am

Re: How useful is scripting compared to programming?

Searching for "scripting vs programming" via Google yielded quite a few results, like this one: Scripting vs Programming: Is There a Difference?
GSEC, eCPPT, Sec+
<<

uperkurk

Newbie
Newbie

Posts: 13

Joined: Wed Sep 21, 2011 9:25 pm

Post Fri Sep 23, 2011 9:54 am

Re: How useful is scripting compared to programming?

But I do get how a script doesnt need to be compiled? and runs inside another program.

Can someone give me an example of when a script would be used... it will help me to understand the purpose for them
<<

lorddicranius

User avatar

Sr. Member
Sr. Member

Posts: 448

Joined: Thu Mar 03, 2011 3:54 am

Post Fri Sep 23, 2011 10:01 am

Re: How useful is scripting compared to programming?

First example that comes to mind is a script used at a previous job.  It was written by my supervisor in Perl and when it ran, it would scan the network for active hosts, then query each host for misc info: hostname, IP, Dell service tag, etc.  The info it gathered was saved in a text file that he would import into an Access database for various things.
GSEC, eCPPT, Sec+
<<

uperkurk

Newbie
Newbie

Posts: 13

Joined: Wed Sep 21, 2011 9:25 pm

Post Fri Sep 23, 2011 12:27 pm

Re: How useful is scripting compared to programming?

Oh right I see thanks for that. So scripts are created for doing specific tasks and save time basically.
<<

idr0p

Newbie
Newbie

Posts: 49

Joined: Fri Jun 17, 2011 8:46 pm

Post Fri Sep 23, 2011 2:02 pm

Re: How useful is scripting compared to programming?

Simple Fast and Targeted = Scripts
GCIA GCIH GPEN GWAPT
Up Next: CISA CISSP
<<

rattis

User avatar

Hero Member
Hero Member

Posts: 1172

Joined: Mon Jul 27, 2009 1:25 pm

Post Fri Sep 23, 2011 4:04 pm

Re: How useful is scripting compared to programming?

couple of examples of scripts I've done in the past:

First checked a directory every 15 minutes for data. If data was there it would send email out to different groups, and then sftp the data out to the customer. (perl)

second one would search the user's networked drives for multimedia content. (perl)

third, had some custom set up for the sftp server. The person that maintained it wasn't a nix person. Shell based script for new user creation with proper customized home directory.

shell scripts that copied the custom configurations for our servers on to a "gold" image to migrate the systems from physical to virtual.
OSWP, Sec+
<<

uperkurk

Newbie
Newbie

Posts: 13

Joined: Wed Sep 21, 2011 9:25 pm

Post Sat Sep 24, 2011 7:45 am

Re: How useful is scripting compared to programming?

So scripts are independant exe files that literally just set the same thing each time, everytime.

I think i'll go with programming then learn scripting once I understand programming properly
<<

rattis

User avatar

Hero Member
Hero Member

Posts: 1172

Joined: Mon Jul 27, 2009 1:25 pm

Post Sat Sep 24, 2011 12:01 pm

Re: How useful is scripting compared to programming?

First thing to clear up here. Scripting is a form of Programming.

No. scripts are pretty dynamic. I just don't need to do more with my scripts than "easy things". When I was in college, the shell scripting book we were using walked us through writing a phone book program.

Place I used to work, everything was programmed in Perl. From the order intake system through the delivery system.

Scripts are usually faster than programs. They are interpreted instead of compiled. They don't need to be compiled, and easier to fix in my opinion since you don't have to compile (and wait for compile) before you have to test again.
OSWP, Sec+

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software