Islami Bank
Post: Quality Assurance (Engineer)
Exam Date: 2025
public class Calculator {
public static int add(int a, int b) {
return a + b;
}
public static void main(String[] args) {
int result = add(10, 20);
System.out.println("The sum is: " + result);
}
}
ব্যাখ্যা দেখুন
add()নামের একটা মেথড তৈরি করা হয়েছে যেটা দুইটা সংখ্যা (a এবং b) ইনপুট হিসেবে নিয়ে তাদের যোগফল রিটার্ন করে।main()মেথডেadd(10, 20)কল করা হয়েছে — মানে ১০ আর ২০ পাঠানো হয়েছে মেথডে।মেথড যোগফল হিসাব করে ৩০ রিটার্ন করেছে, যেটা
resultভ্যারিয়েবলে সংরক্ষণ করা হয়েছে।শেষে
System.out.println()দিয়ে “The sum is: 30” প্রিন্ট করা হয়েছে।
SELECT d.dept_name, AVG(e.salary) AS average_salary FROM department d JOIN employee e ON d.dept_id = e.dept_id GROUP BY d.dept_name;
Cost: Implementing and maintaining a DBMS can be expensive due to the cost of software licenses, hardware, and skilled personnel needed to manage the system.
Complexity: DBMS systems are complex to design, implement, and manage. They require specialized knowledge, and the complexity can increase with the size and scale of the database.
Scalability: Some DBMSs may face challenges when scaling to handle very large amounts of data or high transaction volumes efficiently, especially with unstructured data.
Dependence on Technology: Organizations become dependent on the specific DBMS technology they use, which can cause problems if the vendor stops support or if migration to another system is needed.
Performance Issues: Under heavy loads or with complex queries, DBMS performance can degrade, leading to slower response times and potential bottlenecks.
Data Integration: Integrating data from multiple, heterogeneous sources into a single DBMS can be difficult and time-consuming, especially when data formats and structures differ.
Security: Although DBMSs provide security features, they can still be vulnerable to unauthorized access, hacking, and data breaches if not properly managed.
Data Loss: In cases of hardware failure, software bugs, or disasters, there is a risk of losing data if proper backup and recovery mechanisms are not in place.১. ব্যয় (Cost): DBMS বাস্তবায়ন ও রক্ষণাবেক্ষণ ব্যয়বহুল, কারণ এতে সফটওয়্যার লাইসেন্স, হার্ডওয়্যার এবং দক্ষ জনবলের প্রয়োজন হয় ।
২. জটিলতা (Complexity): DBMS সিস্টেম ডিজাইন, বাস্তবায়ন ও পরিচালনা করা জটিল। এটি ব্যবহারের জন্য বিশেষ জ্ঞানের প্রয়োজন হয়, এবং ডেটাবেসের আকার ও পরিধি বাড়লে জটিলতাও বৃদ্ধি পায়।
৩. স্কেলযোগ্যতা (Scalability): অনেক সময় DBMS বড় পরিমাণ ডেটা বা উচ্চ ট্রানজেকশন হ্যান্ডল করতে গিয়ে সমস্যার সম্মুখীন হয়, বিশেষ করে যদি ডেটা আনস্ট্রাকচার্ড হয়।
৪. প্রযুক্তির উপর নির্ভরতা (Dependence on Technology): একটি প্রতিষ্ঠান নির্দিষ্ট DBMS প্রযুক্তির উপর নির্ভরশীল হয়ে পড়ে। ফলে, যদি সেই ভেন্ডর সাপোর্ট বন্ধ করে দেয় বা অন্য সিস্টেমে স্থানান্তর করতে হয়, তখন সমস্যা দেখা দিতে পারে।
৫. পারফরম্যান্স সমস্যা (Performance Issues): DBMS-এ ভারী লোড বা জটিল কোয়েরি থাকলে সিস্টেমের পারফরম্যান্স কমে যেতে পারে, যার ফলে রেসপন্স টাইম বেড়ে যায় এবং বটলনেক তৈরি হয়।
৬. ডেটা ইন্টিগ্রেশন (Data Integration): বিভিন্ন উৎস থেকে ডেটা একত্র করা কঠিন ও সময়সাপেক্ষ, বিশেষ করে যখন ডেটার ফরম্যাট ও গঠন এক হয়না।
৭. নিরাপত্তা (Security): DBMS-এ নিরাপত্তা ব্যবস্থা থাকলেও, সঠিকভাবে পরিচালনা না করলে এটি অননুমোদিত প্রবেশ, হ্যাকিং বা ডেটা চুরির ঝুঁকিতে থাকে।
৮. ডেটা হারানো (Data Loss): হার্ডওয়্যার ত্রুটি, সফটওয়্যার বাগ বা প্রাকৃতিক দুর্যোগের কারণে ডেটা হারানোর আশঙ্কা থাকে যদি সঠিক ব্যাকআপ ও রিকভারি ব্যবস্থা না থাকে।
The features of SQL (RDBMS), NoSQL, and NewSQL,



CI/CD Development Model
CI/CD (Continuous Integration and Continuous Deployment/Delivery) is a modern software development practice that automates the process of integrating code changes, testing, and deploying applications efficiently.
1. Continuous Integration (CI)
- Developers frequently merge code changes into a shared repository (e.g., GitHub, GitLab)
- Automated builds and tests run to detect integration errors early
- Tools: Jenkins, GitHub Actions, GitLab CI, CircleCI
2. Continuous Delivery (CD)
- Ensures code is always in a deployable state after passing CI tests
- Manual approval may be required before final deployment
3. Continuous Deployment (CD)
- Fully automated deployment to production after CI/CD pipeline success
- No manual intervention needed (used in mature DevOps environments)
Benefits of CI/CD:
✓ Faster Releases – Automation reduces manual errors and speeds up deployment
✓ Early Bug Detection – Automated testing catches issues before production
✓ Improved Collaboration – Developers integrate changes frequently
✓ Rollback Capability – Easy to revert if a deployment fails
CI/CD Pipeline Stages:
- Code Commit
- Build
- Test
- Deploy (Staging/Production)
SQL Injection
SQL Injection is a type of attack where an attacker inserts malicious SQL queries into input fields, allowing them to manipulate or retrieve data from the database. This can result in unauthorized access, data theft, or even complete control over the database.Example: If a website uses the following SQL query to check login credentials:
SELECT * FROM users WHERE username = 'input' AND password = 'input';
An attacker can input the following into the username or password field:
' OR 1=1 --
This will change the query to:
SELECT * FROM users WHERE username = '' OR 1=1 -- AND password = '';
The condition `1=1` is always true, allowing the attacker to bypass the login and gain access to the application.
Cross-Site Scripting (XSS)
XSS (Cross-Site Scripting) is a security vulnerability that allows attackers to inject malicious JavaScript code into a website’s pages. This code is then executed in the browsers of users who visit the infected page, allowing attackers to steal sensitive data like cookies, session tokens, or even login credentials.
Example: If a website allows a user to submit a comment like:
<input type="text" name="comment" />
Without sanitizing the input, an attacker could submit the following as a comment:
<script>alert('XSS Attack');</script>
If the website displays this comment without filtering out the <script> tag, it will execute the JavaScript code in the victim’s browser, potentially leading to a stolen session or a malicious redirect.
SQL Injection
SQL Injection হল একটি আক্রমণ যেখানে আক্রমণকারী ইনপুট ফিল্ডের মাধ্যমে ক্ষতিকর SQL কোড ইনজেক্ট করে, যার মাধ্যমে তারা ডাটাবেসে তথ্য চুরি বা পরিবর্তন করতে পারে। এটি অ্যাপ্লিকেশন বা ডাটাবেসের উপর অবৈধ নিয়ন্ত্রণ পাওয়ার কারণ হতে পারে।উদাহরণস্বরূপ, যদি একটি ওয়েবসাইট লগইন যাচাই করতে নিম্নলিখিত SQL কোড ব্যবহার করে:
SELECT * FROM users WHERE username = 'input' AND password = 'input';
আক্রমণকারী যদি ব্যবহারকারী নাম বা পাসওয়ার্ডে এই কোড ইনপুট করে:
' OR 1=1 --
কোডটি পরিবর্তিত হয়ে যাবে:
SELECT * FROM users WHERE username = '' OR 1=1 -- AND password = '';
এখানে `1=1` সবসময় সঠিক, যার ফলে আক্রমণকারী লগইন পাস করে ওয়েবসাইটে প্রবেশ করতে সক্ষম হবে।
Cross-Site Scripting (XSS)
XSS (Cross-Site Scripting) হল একটি নিরাপত্তা দুর্বলতা যেখানে আক্রমণকারী ওয়েবসাইটে JavaScript কোড ইনজেক্ট করে। এই কোডটি ওয়েবসাইট ভিজিট করা ব্যবহারকারীর ব্রাউজারে এক্সিকিউট হয়, যার মাধ্যমে আক্রমণকারী গোপন তথ্য যেমন কুকি, সেশন টোকেন বা লগইন ক্রেডেনশিয়াল চুরি করতে পারে।
উদাহরণস্বরূপ, যদি একটি ওয়েবসাইটে একটি মন্তব্য পাঠানোর ফর্ম থাকে:
<input type="text" name="comment" />
যদি ইনপুটটি স্যানিটাইজ না করা হয়, আক্রমণকারী মন্তব্য হিসেবে নিম্নলিখিত কোড দিতে পারে:
<script>alert('XSS Attack');</script>
যদি ওয়েবসাইটটি <script> ট্যাগটি ফিল্টার না করে, তাহলে কোডটি ব্রাউজারে এক্সিকিউট হবে, যার মাধ্যমে আক্রমণকারী সেশন চুরি বা ম্যালওয়্যার রিডিরেক্ট করতে পারে।
CSRF (Cross-Site Request Forgery) is a type of web attack where the attacker tricks the victim into unknowingly sending a forged request to a web application, using the victim’s authentication credentials (such as a session cookie). The forged request appears legitimate to the server, and the victim is typically unaware that their action (such as transferring funds or modifying account settings) has been hijacked by the attacker. In CSRF, the attacker doesn’t need to know the user’s secret information, but instead exploits the active session or authentication token to perform unauthorized actions.
ব্যাখ্যা দেখুন
Understanding CSRF (Cross-Site Request Forgery): A Comprehensive Overview
By using cross-site request forgery (CSRF), an attacker can force a victim’s browser to send a request to a website where the victim has already authenticated (such as a bank site). Without requiring the victim’s login credentials, the attacker can initiate actions such as money transfers if the victim clicks on a harmful link.
The Procedure for a CSRF Attack:
Victim Login and Establishing a Session:
A session is established when the victim logs into a website, such as a banking website. A Session ID, usually stored in a cookie on the victim’s browser, is used to identify this session. During this session, the victim can access their account and remain logged in without having to enter their credentials again for every action (such as transferring money).
Attacker’s Goal:
Now, the attacker’s goal is to transfer funds from the victim’s bank account without the victim’s direct interaction. This is carried out without being aware of the victim’s login information, including their username, password, PIN, etc.
Creating a Malicious Request:
It is not necessary for the attacker to log in. Rather, they produce a malicious URL that causes the victim’s bank account to be credited. Tricking the victim into clicking on this link is the attacker’s aim.
In order to get the victim to click on the link, the attacker uses social engineering to send it to them via email, social media, or another channel.
How the Attack Works:
The victim’s browser sends the request, along with the session cookie created when they logged in, to the bank’s server when they click on the malicious link.
The request is handled by the server as though it were from the authenticated user because it trusts the session cookie.
Since the victim is already logged in, the server assumes it’s a legitimate request and transfers the funds from the victim’s account to the attacker’s account.
Preventing CSRF Attacks:
Token-Based Security (Anti-CSRF Token):
Many frameworks, including Django, use this robust defense. The concept is that a distinct, random CSRF token is included in every form or sensitive action (such as money transfers).
When a user requests a sensitive action or loads a form for the first time, the server creates this token. With every request, this token is returned as a URL parameter, HTTP header, or form field.
With every request, the server verifies this token. The request is deemed invalid and blocked if the token does not match the expected one.
The attacker has no access to the valid CSRF token. Since they cannot predict or generate the correct token, their malicious requests will be rejected by the server.
Referrer Header Verification:
The server is informed of the origin of the request by the Referrer Header. The server can determine whether the request is coming from a reliable source or an external (malicious) website by looking at the referrer.
For instance, a request may be blocked if it originates from a suspicious source, such as the attacker’s website.
Cross-Site Request Forgery (CSRF) ব্যবহার করে, একজন অ্যাটাকার(attacker) ভিক্টিমের ব্রাউজারকে এমন একটি ওয়েবসাইটে রিকোয়েস্ট পাঠাতে বাধ্য করতে পারে যেখানে ভিক্টিম আগে থেকেই অথেন্টিকেট(authenticate) করা আছে (যেমন, একটি ব্যাংক সাইট)। ভিক্টিমের লগইন ক্রেডেনশিয়াল(credential) ছাড়াই, অ্যাটাকার টাকা ট্রান্সফারের মতো কাজ শুরু করতে পারে, যদি ভিক্টিম একটি ক্ষতিকর(harmful) লিঙ্কে ক্লিক করে।
CSRF অ্যাটাকের পদ্ধতি
ভিক্টিমের লগইন এবং সেশন স্থাপন
যখন ভিক্টিম কোনো ওয়েবসাইটে, যেমন একটি ব্যাংকিং ওয়েবসাইটে লগইন করে, তখন একটি সেশন (session) তৈরি হয়। এই সেশনটিকে একটি Session ID দ্বারা চিহ্নিত করা হয়, যা সাধারণত ভিক্টিমের ব্রাউজারে একটি কুকি (cookie) হিসেবে সংরক্ষিত থাকে। এই সেশনের সময়, ভিক্টিম তার অ্যাকাউন্ট বারবার ক্রেডেনশিয়াল প্রবেশ করানো ছাড়াই অ্যাক্সেস বা লগিন(Login) করতে পারে বা
Attacker’s Goal:
এখন, অ্যাটাকারের লক্ষ্য হলো ভিক্টিমের সরাসরি কোনো অংশগ্রহণ ছাড়াই তার ব্যাংক অ্যাকাউন্ট থেকে ফান্ড ট্রান্সফার করা। এটি ভিক্টিমের লগইন তথ্য, যেমন তার ইউজারনেইম, পাসওয়ার্ড, পিন ইত্যাদি না জেনেই করা হয়।
Creating a Malicious Request:
অ্যাটাকারকে লগইন না করে একটি ম্যালিসিয়াস(Malicious) URL তৈরি করে যা ভিক্টিমের ব্যাংক অ্যাকাউন্ট থেকে টাকা সরানোর কাজ করে। অ্যাটাকারের লক্ষ্য হলো ভিক্টিমকে এই লিঙ্কে ক্লিক করতে প্রলুব্ধ করা।
ভিক্টিমকে লিঙ্কে(link) ক্লিক করানোর জন্য, অ্যাটাকার সোশ্যাল ইঞ্জিনিয়ারিং ব্যবহার করে ইমেল, সোশ্যাল মিডিয়া বা অন্য কোনো চ্যানেলের মাধ্যমে এটি তাদের কাছে পাঠায়।
How the Attack Works:
ভিক্টিম যখন ম্যালিসিয়াস লিঙ্কে ক্লিক করে, তখন তার ব্রাউজারটি লগইন করার সময় তৈরি হওয়া সেশন কুকি সহ রিকোয়েস্টটি ব্যাংকের সার্ভারে পাঠায়।
সার্ভার সেশন কুকির ভিত্তিতে রিকোয়েস্টটিকে অথেন্টিকেটেড ব্যবহারকারীর কাছ থেকে আসা রিকোয়েস্ট হিসেবেই গণ্য করে।
যেহেতু ভিক্টিম আগে থেকেই লগইন করা আছে, সার্ভার এটিকে একটি বৈধ রিকোয়েস্ট হিসেবে ধরে নেয় এবং ভিক্টিমের অ্যাকাউন্ট থেকে অ্যাটাকারের অ্যাকাউন্টে ফান্ড ট্রান্সফার করে দেয়।
CSRF অ্যাটাক প্রতিরোধ
টোকেন-ভিত্তিক নিরাপত্তা (Anti-CSRF Token)
Django-সহ অনেক ফ্রেমওয়ার্ক এই শক্তিশালী প্রতিরক্ষা ব্যবস্থা ব্যবহার করে। এর মূল ধারণাটি হলো, প্রতিটি ফর্ম বা সংবেদনশীল(sensitive) কাজে (যেমন টাকা ট্রান্সফার) একটি স্বতন্ত্র(unique), র্যান্ডম(random) CSRF টোকেন অন্তর্ভুক্ত করা হয়।
যখন একজন ব্যবহারকারী কোনো সংবেদনশীল কাজের জন্য রিকোয়েস্ট করে বা প্রথমবারের মতো একটি ফর্ম লোড করে, তখন সার্ভার এই টোকেনটি তৈরি করে। প্রতিটি রিকোয়েস্টের সাথে, এই টোকেনটি একটি URL প্যারামিটার, HTTP হেডার, বা ফর্ম ফিল্ড হিসাবে ফেরত পাঠানো হয়।
প্রতিটি রিকোয়েস্টের সাথে সার্ভার এই টোকেনটি যাচাই করে। যদি টোকেনটি প্রত্যাশিত টোকেনের সাথে না মেলে, তবে রিকোয়েস্টটিকে অবৈধ বলে গণ্য করা হয় এবং ব্লক করে দেওয়া হয়।
অ্যাটাকারের কাছে বৈধ CSRF টোকেনের অ্যাক্সেস থাকে না। যেহেতু তারা সঠিক টোকেন অনুমান বা তৈরি করতে পারে না, তাই তাদের ম্যালিসিয়াস রিকোয়েস্টগুলো সার্ভার দ্বারা বাতিল হয়ে যাবে।
Referrer Header ভেরিফিকেশন
Referrer Header সার্ভারকে জানায় যে রিকোয়েস্টটি কোথা থেকে এসেছে। সার্ভার রেফারার দেখে নির্ধারণ করতে পারে যে রিকোয়েস্টটি কোনো বিশ্বস্ত উৎস(source) থেকে আসছে নাকি কোনো বাহ্যিক (ম্যালিসিয়াস) ওয়েবসাইট থেকে। যদি কোনো রিকোয়েস্ট সন্দেহজনক হয় তা ব্লক করে দেয়া হয়।
Question not Fully Collected
